Don\'t use -B...gcc.. on Darwin

am: 3772da13fd

* commit '3772da13fd9b4d1f0aec35c73883c1cb5b60fd35':
  Don't use -B...gcc.. on Darwin

Change-Id: Iad450b34cc85054b573ec0c2b8537414def9ef52
This commit is contained in:
Dan Willemsen 2016-05-17 02:05:50 +00:00 committed by android-build-merger
commit aaaeb15c73
2 changed files with 8 additions and 2 deletions

View File

@ -1091,7 +1091,10 @@ func (compiler *baseCompiler) flags(ctx ModuleContext, flags Flags) Flags {
flags.LdFlags = clangFilterUnknownCflags(flags.LdFlags)
target := "-target " + toolchain.ClangTriple()
gccPrefix := "-B" + filepath.Join(toolchain.GccRoot(), toolchain.GccTriple(), "bin")
var gccPrefix string
if !ctx.Darwin() {
gccPrefix = "-B" + filepath.Join(toolchain.GccRoot(), toolchain.GccTriple(), "bin")
}
flags.CFlags = append(flags.CFlags, target, gccPrefix)
flags.AsFlags = append(flags.AsFlags, target, gccPrefix)

View File

@ -86,7 +86,10 @@ func makeVarsToolchain(ctx common.MakeVarsContext, secondPrefix string,
if toolchain.ClangSupported() {
clangPrefix := secondPrefix + "CLANG_" + typePrefix
clangExtras := "-target " + toolchain.ClangTriple() + " -B" + filepath.Join(toolchain.GccRoot(), toolchain.GccTriple(), "bin")
clangExtras := "-target " + toolchain.ClangTriple()
if ht != common.Darwin {
clangExtras += " -B" + filepath.Join(toolchain.GccRoot(), toolchain.GccTriple(), "bin")
}
globalClangCflags := fmt.Sprintf("${commonClangGlobalCflags} ${clangExtraCflags} ${%sClangGlobalCflags}", hod)