Switch back to llvm-ar (with crsD flags only).
This properly sets -format=gnu for all non-Darwin targets, because llvm-ar is cross-platform (but defaults to the host environment). Bug: http://b/71618641 Test: m checkbuild Change-Id: Ic5bce7e237ea0cadfa1f96ea151d41115d8c56b8
This commit is contained in:
parent
2605a61f2d
commit
f1addebb44
|
@ -508,8 +508,11 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
|
|||
return
|
||||
}
|
||||
|
||||
arCmd := gccCmd(flags.toolchain, "ar")
|
||||
arFlags := "crsPD"
|
||||
arCmd := "${config.ClangBin}/llvm-ar"
|
||||
arFlags := "crsD"
|
||||
if !ctx.Darwin() {
|
||||
arFlags += " -format=gnu"
|
||||
}
|
||||
if flags.arFlags != "" {
|
||||
arFlags += " " + flags.arFlags
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
|||
if target.Os == android.Darwin {
|
||||
ctx.Strict(makePrefix+"AR", "${config.MacArPath}")
|
||||
} else {
|
||||
ctx.Strict(makePrefix+"AR", gccCmd(toolchain, "ar"))
|
||||
ctx.Strict(makePrefix+"AR", "${config.ClangBin}/llvm-ar")
|
||||
ctx.Strict(makePrefix+"READELF", gccCmd(toolchain, "readelf"))
|
||||
ctx.Strict(makePrefix+"NM", gccCmd(toolchain, "nm"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue