Switch to llvm-ar (with crsD flags only).

llvm-ar is required for platform LTO build.

Bug: 71618641
Test: m checkbuild
Change-Id: Idecea9fbe5dcbb1023dbe90047e3f9535d953440
This commit is contained in:
Yi Kong 2017-11-29 16:47:43 -08:00
parent e7fa3b1b74
commit 13bc31d6e1
2 changed files with 3 additions and 3 deletions

View File

@ -508,8 +508,8 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
return
}
arCmd := gccCmd(flags.toolchain, "ar")
arFlags := "crsPD"
arCmd := "${config.ClangBin}/llvm-ar"
arFlags := "crsD"
if flags.arFlags != "" {
arFlags += " " + flags.arFlags
}

View File

@ -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"))
}