forked from openkylin/platform_build
Merge "Explicitly add lld's relr relocation flags for Android Pie and above" am: 8d8e3d6157
am: 2717256223
Change-Id: I5ecd21228b4b31693d86fd0b6ed8f21ffed94983
This commit is contained in:
commit
b4e614cfe1
|
@ -1614,7 +1614,9 @@ my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLO
|
|||
ifeq ($(my_use_clang_lld),true)
|
||||
my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
|
||||
include $(BUILD_SYSTEM)/pack_dyn_relocs_setup.mk
|
||||
ifeq ($(my_pack_module_relocations),false)
|
||||
ifeq ($(my_pack_module_relocations),true)
|
||||
my_target_global_ldflags += -Wl,--pack-dyn-relocs=android+relr -Wl,--use-android-relr-tags
|
||||
else
|
||||
my_target_global_ldflags += -Wl,--pack-dyn-relocs=none
|
||||
endif
|
||||
else
|
||||
|
|
|
@ -32,3 +32,12 @@ ifdef LOCAL_IS_HOST_MODULE
|
|||
# Do not pack relocations on host modules
|
||||
my_pack_module_relocations := false
|
||||
endif
|
||||
|
||||
# Lld relocation packing cannot be enabled for binaries before Android Pie.
|
||||
ifneq ($(LOCAL_SDK_VERSION),)
|
||||
ifneq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(call math_lt,$(LOCAL_SDK_VERSION),28),true)
|
||||
my_pack_module_relocations := false
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue