Don't use -B...gcc.. on Darwin
We don't ship binutils on Darwin, so there is no point in telling clang to look in that path. (The path being used doesn't even exist). This matches the Make behavior. Change-Id: I663047057ff8df8a349483532da8018af13d50d8
This commit is contained in:
parent
88c4750c51
commit
3772da13fd
2 changed files with 8 additions and 2 deletions
5
cc/cc.go
5
cc/cc.go
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue