Disable standalone relocation packer
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer. Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.
This will also prevent relocation packing on prebuilt shared
libraries.
Also enables relocation packing on Darwin since lld will work on
Darwin.
Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index d5b7877..f82af2f 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -42,9 +42,6 @@
my_strip_module := $(firstword \
$(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
$(LOCAL_STRIP_MODULE))
-my_pack_module_relocations := $(firstword \
- $(LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
- $(LOCAL_PACK_MODULE_RELOCATIONS))
ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS))
# LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES indicates that this prebuilt should be
@@ -63,21 +60,6 @@
# Strip but not try to add debuglink
my_strip_module := no_debuglink
endif
-
- ifeq ($(LOCAL_IS_HOST_MODULE)$(my_pack_module_relocations),)
- # Do not pack relocations by default
- my_pack_module_relocations := false
- endif
-
- ifeq ($(DISABLE_RELOCATION_PACKER),true)
- my_pack_module_relocations := false
- endif
-
- # Relocation packer does not work with LLD yet.
- # my_use_clang_lld might be used before being set up in binary.mk
- ifeq ($(my_use_clang_lld),true)
- my_pack_module_relocations := false
- endif
endif
ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
@@ -141,7 +123,7 @@
endif # LOCAL_COMPRESSED_MODULE
endif
-ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module) $(my_pack_module_relocations)),)
+ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module)),)
ifdef LOCAL_IS_HOST_MODULE
$(error Cannot strip/pack host module LOCAL_PATH=$(LOCAL_PATH))
endif
@@ -151,13 +133,12 @@
ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(error Cannot strip/pack scripts LOCAL_PATH=$(LOCAL_PATH))
endif
- # Set the arch-specific variables to set up the strip/pack rules.
+ # Set the arch-specific variables to set up the strip rules
LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_strip_module)
- LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_pack_module_relocations)
include $(BUILD_SYSTEM)/dynamic_binary.mk
built_module := $(linked_module)
-else # my_strip_module and my_pack_module_relocations not true
+else # my_strip_module not true
include $(BUILD_SYSTEM)/base_rules.mk
built_module := $(LOCAL_BUILT_MODULE)