Stop passing the gold plugin path to llvm-ar.
llvm-ar takes a --plugin argument but it is ignored for compatibility,
so passing it has no effect.
Change-Id: I4fc51d226d66cf2a43462d3d4ccc12e6e5ebb226
diff --git a/cc/builder.go b/cc/builder.go
index 3d12538..6d5b595 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -247,7 +247,6 @@
systemIncludeFlags string
groupStaticLibs bool
- arGoldPlugin bool
stripKeepSymbols bool
stripKeepMiniDebugInfo bool
@@ -485,9 +484,6 @@
if !ctx.Darwin() {
arFlags += " -format=gnu"
}
- if flags.arGoldPlugin {
- arFlags += " --plugin ${config.LLVMGoldPlugin}"
- }
if flags.arFlags != "" {
arFlags += " " + flags.arFlags
}
diff --git a/cc/cc.go b/cc/cc.go
index 0569563..fcd8a45 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -157,7 +157,6 @@
LdFlagsDeps android.Paths // Files depended on by linker flags
GroupStaticLibs bool
- ArGoldPlugin bool // Whether LLVM gold plugin option is passed to llvm-ar
}
type ObjectLinkerProperties struct {
diff --git a/cc/config/global.go b/cc/config/global.go
index 057e08a..d4f86b8 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -15,7 +15,6 @@
package config
import (
- "runtime"
"strings"
"android/soong/android"
@@ -211,11 +210,6 @@
return ClangDefaultShortVersion
})
pctx.StaticVariable("ClangAsanLibDir", "${ClangBase}/linux-x86/${ClangVersion}/lib64/clang/${ClangShortVersion}/lib/linux")
- if runtime.GOOS == "darwin" {
- pctx.StaticVariable("LLVMGoldPlugin", "${ClangPath}/lib64/LLVMgold.dylib")
- } else {
- pctx.StaticVariable("LLVMGoldPlugin", "${ClangPath}/lib64/LLVMgold.so")
- }
// These are tied to the version of LLVM directly in external/llvm, so they might trail the host prebuilts
// being used for the rest of the build process.
diff --git a/cc/lto.go b/cc/lto.go
index 52b9a34..6302748 100644
--- a/cc/lto.go
+++ b/cc/lto.go
@@ -105,8 +105,6 @@
flags.LdFlags = append(flags.LdFlags, cachePolicyFormat+policy)
}
- flags.ArGoldPlugin = true
-
// If the module does not have a profile, be conservative and do not inline
// or unroll loops during LTO, in order to prevent significant size bloat.
if !ctx.isPgoCompile() && !lto.useClangLld(ctx) {
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 330a5e3..cd3b3e9 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -466,7 +466,6 @@
flags.CFlags = append(flags.CFlags, "-fvisibility=default")
}
flags.LdFlags = append(flags.LdFlags, cfiLdflags...)
- flags.ArGoldPlugin = true
if Bool(sanitize.Properties.Sanitize.Diag.Cfi) {
diagSanitizers = append(diagSanitizers, "cfi")
}
diff --git a/cc/util.go b/cc/util.go
index 1412d54..c900423 100644
--- a/cc/util.go
+++ b/cc/util.go
@@ -86,7 +86,6 @@
systemIncludeFlags: strings.Join(in.SystemIncludeFlags, " "),
groupStaticLibs: in.GroupStaticLibs,
- arGoldPlugin: in.ArGoldPlugin,
}
}