Switch to llvm-ar

llvm-ar is required for platform LTO build.

With GNU ar, we used crsPD flags, however 'P' flag is not supported by
llvm-ar. Since none of the platform archive files are built using third
party AR, the 'P' flag should not matter to us. However we've been
relying on one side-effect of 'P', where  'ar foo.a some/path/to/obj.o'
when foo.a already has a file named 'obj.o' will be an append operation,
regardless whether the existing one is the same (ar has no way of
telling the difference). We workaround this by always appending ('q'
flag) for llvm-ar. This may result in larger intermediate archive files
(more duplication) but will not affect the final build result.

Bug: 71618641
Test: m checkbuild
Change-Id: Id96a244cfe49cecfba08cc868dd18934ecb4ff23
This commit is contained in:
Stephen Hines 2017-12-11 10:39:41 -08:00 committed by Yi Kong
parent b0f4677748
commit 5128702ed3
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ endif
# setup AUX globals
AUX_SHLIB_SUFFIX := .so
AUX_GLOBAL_ARFLAGS := crsPD
AUX_GLOBAL_ARFLAGS := cqsD
AUX_STATIC_LIB_SUFFIX := .a
# Load ever-lasting "indexed" version of AUX variant environment; it is treated as READ-ONLY from this

View File

@ -28,7 +28,7 @@ combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target)
# Set reasonable defaults for the various variables
$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD
$(combo_var_prefix)GLOBAL_ARFLAGS := cqsD
$(combo_var_prefix)STATIC_LIB_SUFFIX := .a