Revert "Revert "Revert "Enable lld for windows"""

This reverts commit 6d8c0a50bc.

The switchover to lld appears to be making adb crash on exit for unclear
reasons. Revert it as a quick fix pending further investigation.

Bug: http://b/134613180
Test: adb.exe under windbg
Change-Id: Ibdf5981c3c6828b3684974b7c30a7c96449c64c5
This commit is contained in:
Josh Gao
2019-06-07 12:30:30 -07:00
parent 14bb14e0c3
commit b20200b3f5
4 changed files with 18 additions and 29 deletions

View File

@@ -295,6 +295,10 @@ func (linker *baseLinker) useClangLld(ctx ModuleContext) bool {
if ctx.Darwin() {
return false
}
// http://b/110800681 - lld cannot link Android's Windows modules yet.
if ctx.Windows() {
return false
}
if linker.Properties.Use_clang_lld != nil {
return Bool(linker.Properties.Use_clang_lld)
}
@@ -348,7 +352,7 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
// darwin defaults to treating undefined symbols as errors
flags.LdFlags = append(flags.LdFlags, "-Wl,-undefined,dynamic_lookup")
}
} else if !ctx.Darwin() && !ctx.Windows() {
} else if !ctx.Darwin() {
flags.LdFlags = append(flags.LdFlags, "-Wl,--no-undefined")
}
@@ -385,7 +389,7 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
flags.LdFlags = append(flags.LdFlags, proptools.NinjaAndShellEscapeList(linker.Properties.Ldflags)...)
if ctx.Host() && !ctx.Windows() {
if ctx.Host() {
rpath_prefix := `\$$ORIGIN/`
if ctx.Darwin() {
rpath_prefix = "@loader_path/"