Add back the llvm-ar P flag

The P flag is supported as of llvm r354044, add back the flag to reduce
the size of intermediate archieve files. This does not affect the final
binaries.

Test: built
Bug: 71618641
Change-Id: I017780e4dcaa31c7fbe10b5e7482db1bba83e716
This commit is contained in:
Yi Kong 2019-09-06 15:11:57 -07:00
parent 2895bf7182
commit ee96a7956a
1 changed files with 1 additions and 1 deletions

View File

@ -551,7 +551,7 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
flags builderFlags, outputFile android.ModuleOutPath, deps android.Paths) {
arCmd := "${config.ClangBin}/llvm-ar"
arFlags := "crsD"
arFlags := "crsPD"
if !ctx.Darwin() {
arFlags += " -format=gnu"
}