pa: sdclang: Sync LTO makefile with LA.UM.6.2.r1-08100-sdm660.0
Change-Id: I6fa38ff1ac0f1c24e298e56a83d0bef3c22ca03d Signed-off-by: Alex Naidis <alex.naidis@paranoidandroid.co>
This commit is contained in:
parent
3ef86f04cf
commit
d76bbd77ee
|
@ -2,6 +2,11 @@ ifeq ($(LOCAL_MODULE_CLASS), STATIC_LIBRARIES)
|
|||
# For STATIC_LIBRARIES we need to use SD LLVM's archiver and archiver flags.
|
||||
|
||||
AR := $(SDCLANG_PATH)/llvm-ar
|
||||
|
||||
ifeq ($(LOCAL_SDCLANG_2),true)
|
||||
AR := $(SDCLANG_PATH_2)/llvm-ar
|
||||
endif
|
||||
|
||||
ARFLAGS := crsD
|
||||
|
||||
# For 32 bit
|
||||
|
@ -10,7 +15,7 @@ $(LOCAL_BUILT_MODULE) : $(combo_var_prefix)GLOBAL_ARFLAGS := $(ARFLAGS)
|
|||
|
||||
# For 64 bit
|
||||
intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
|
||||
LOCAL_BUILT_MODULE_64 := $(intermediates)/$(my_built_module_stem)
|
||||
LOCAL_BUILT_MODULE_64 := $(intermediates)/$(my_installed_module_stem)
|
||||
|
||||
$(LOCAL_BUILT_MODULE_64) : TARGET_AR := $(AR)
|
||||
$(LOCAL_BUILT_MODULE_64) : TARGET_GLOBAL_ARFLAGS := $(ARFLAGS)
|
||||
|
@ -19,17 +24,11 @@ else
|
|||
# For SHARED_LIBRARIES and EXECUTABLES we need to filter out flags not
|
||||
# needed/understood by SD LLVM's Linker.
|
||||
|
||||
linked_module_32 := $(intermediates)/LINKED/$(my_built_module_stem)
|
||||
FLAGS_TO_BE_FILTERED := -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--fix-cortex-a53-843419 -fuse-ld=gold
|
||||
linked_module_32 := $(intermediates)/LINKED/$(my_installed_module_stem)
|
||||
intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
|
||||
linked_module_64 := $(intermediates)/LINKED/$(my_built_module_stem)
|
||||
linked_module_64 := $(intermediates)/LINKED/$(my_installed_module_stem)
|
||||
|
||||
FLAGS_TO_BE_FILTERED := -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--fix-cortex-a53-843419 -Wl,--no-fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 -Wl,--no-fix-cortex-a53-835769 -fuse-ld=gold
|
||||
$(linked_module_32) : PRIVATE_TARGET_GLOBAL_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_TARGET_GLOBAL_LDFLAGS))
|
||||
$(linked_module_64) : PRIVATE_TARGET_GLOBAL_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_TARGET_GLOBAL_LDFLAGS))
|
||||
|
||||
ifeq ($(LOCAL_SDCLANG_LTO_UNSAFE_FILTER), true)
|
||||
$(linked_module_32) : PRIVATE_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_LDFLAGS))
|
||||
$(linked_module_64) : PRIVATE_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_LDFLAGS))
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue