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
This commit is contained in:
Peter Collingbourne
2018-11-08 19:55:28 -08:00
parent ec2f6cba80
commit abde584fd1
6 changed files with 0 additions and 15 deletions

View File

@@ -247,7 +247,6 @@ type builderFlags struct {
systemIncludeFlags string systemIncludeFlags string
groupStaticLibs bool groupStaticLibs bool
arGoldPlugin bool
stripKeepSymbols bool stripKeepSymbols bool
stripKeepMiniDebugInfo bool stripKeepMiniDebugInfo bool
@@ -485,9 +484,6 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
if !ctx.Darwin() { if !ctx.Darwin() {
arFlags += " -format=gnu" arFlags += " -format=gnu"
} }
if flags.arGoldPlugin {
arFlags += " --plugin ${config.LLVMGoldPlugin}"
}
if flags.arFlags != "" { if flags.arFlags != "" {
arFlags += " " + flags.arFlags arFlags += " " + flags.arFlags
} }

View File

@@ -157,7 +157,6 @@ type Flags struct {
LdFlagsDeps android.Paths // Files depended on by linker flags LdFlagsDeps android.Paths // Files depended on by linker flags
GroupStaticLibs bool GroupStaticLibs bool
ArGoldPlugin bool // Whether LLVM gold plugin option is passed to llvm-ar
} }
type ObjectLinkerProperties struct { type ObjectLinkerProperties struct {

View File

@@ -15,7 +15,6 @@
package config package config
import ( import (
"runtime"
"strings" "strings"
"android/soong/android" "android/soong/android"
@@ -211,11 +210,6 @@ func init() {
return ClangDefaultShortVersion return ClangDefaultShortVersion
}) })
pctx.StaticVariable("ClangAsanLibDir", "${ClangBase}/linux-x86/${ClangVersion}/lib64/clang/${ClangShortVersion}/lib/linux") 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 // 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. // being used for the rest of the build process.

View File

@@ -105,8 +105,6 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
flags.LdFlags = append(flags.LdFlags, cachePolicyFormat+policy) flags.LdFlags = append(flags.LdFlags, cachePolicyFormat+policy)
} }
flags.ArGoldPlugin = true
// If the module does not have a profile, be conservative and do not inline // 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. // or unroll loops during LTO, in order to prevent significant size bloat.
if !ctx.isPgoCompile() && !lto.useClangLld(ctx) { if !ctx.isPgoCompile() && !lto.useClangLld(ctx) {

View File

@@ -466,7 +466,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
flags.CFlags = append(flags.CFlags, "-fvisibility=default") flags.CFlags = append(flags.CFlags, "-fvisibility=default")
} }
flags.LdFlags = append(flags.LdFlags, cfiLdflags...) flags.LdFlags = append(flags.LdFlags, cfiLdflags...)
flags.ArGoldPlugin = true
if Bool(sanitize.Properties.Sanitize.Diag.Cfi) { if Bool(sanitize.Properties.Sanitize.Diag.Cfi) {
diagSanitizers = append(diagSanitizers, "cfi") diagSanitizers = append(diagSanitizers, "cfi")
} }

View File

@@ -86,7 +86,6 @@ func flagsToBuilderFlags(in Flags) builderFlags {
systemIncludeFlags: strings.Join(in.SystemIncludeFlags, " "), systemIncludeFlags: strings.Join(in.SystemIncludeFlags, " "),
groupStaticLibs: in.GroupStaticLibs, groupStaticLibs: in.GroupStaticLibs,
arGoldPlugin: in.ArGoldPlugin,
} }
} }