Revert "Enable lld for windows"
This reverts commit 3c21c0b1d9bab0d51100ca03aa157a1d8545c2ea.
Reason for revert: appears to break AdbWinUsb.dll usage by fastboot (and adb?)
Bug: http://b/129420419
Bug: http://b/110800681
Change-Id: I36d6d87f2e830e08e257ab42d470e49cdbb95819
diff --git a/cc/linker.go b/cc/linker.go
index 179a998..fd958ba 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -290,6 +290,10 @@
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)
}
@@ -343,7 +347,7 @@
// 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")
}
@@ -380,7 +384,7 @@
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/"