Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abde584f authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

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
parent ec2f6cba
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -247,7 +247,6 @@ type builderFlags struct {
	systemIncludeFlags string

	groupStaticLibs bool
	arGoldPlugin    bool

	stripKeepSymbols       bool
	stripKeepMiniDebugInfo bool
@@ -485,9 +484,6 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
	if !ctx.Darwin() {
		arFlags += " -format=gnu"
	}
	if flags.arGoldPlugin {
		arFlags += " --plugin ${config.LLVMGoldPlugin}"
	}
	if flags.arFlags != "" {
		arFlags += " " + flags.arFlags
	}
+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ type Flags struct {
	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 {
+0 −6
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
package config

import (
	"runtime"
	"strings"

	"android/soong/android"
@@ -211,11 +210,6 @@ func init() {
		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.
+0 −2
Original line number Diff line number Diff line
@@ -105,8 +105,6 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
			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) {
+0 −1
Original line number Diff line number Diff line
@@ -466,7 +466,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
			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")
		}
Loading