Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b186569e authored by Cole Faust's avatar Cole Faust
Browse files

Remove system_linker_config module

The linker.config.pb on the system image has some system-specific
build steps. The system_linker_config module was just one of the
steps, but the rest of the steps depend on installed files, which
are only known to the filesystem modules, so they happen there.
Move this first initial step to the filesystem level as well for
consistency.

Bug: 384091387
Test: Diff'd out/target/product/vsoc_x86_64/system/etc/linker.config.pb before and after this cl
Change-Id: Ia27e1b72bd0a003b4043bf3ff089383cff3cd486
parent 8cccc28c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3504,18 +3504,20 @@ ifdef BUILDING_SYSTEM_IMAGE
# Collect all available stub libraries installed in system and install with predefined linker configuration
# Also append LLNDK libraries in the APEX as required libs
SYSTEM_LINKER_CONFIG := $(TARGET_OUT)/etc/linker.config.pb
SYSTEM_LINKER_CONFIG_SOURCE := $(call intermediates-dir-for,ETC,system_linker_config)/system_linker_config
SYSTEM_LINKER_CONFIG_SOURCE := system/core/rootdir/etc/linker.config.json
$(SYSTEM_LINKER_CONFIG): PRIVATE_SYSTEM_LINKER_CONFIG_SOURCE := $(SYSTEM_LINKER_CONFIG_SOURCE)
$(SYSTEM_LINKER_CONFIG): $(INTERNAL_SYSTEMIMAGE_FILES) $(SYSTEM_LINKER_CONFIG_SOURCE) | conv_linker_config
	@echo Creating linker config: $@
	@mkdir -p $(dir $@)
	@rm -f $@
	$(HOST_OUT_EXECUTABLES)/conv_linker_config systemprovide --source $(PRIVATE_SYSTEM_LINKER_CONFIG_SOURCE) \
	@rm -f $@ $@.step1
	$(HOST_OUT_EXECUTABLES)/conv_linker_config proto --force -s $(PRIVATE_SYSTEM_LINKER_CONFIG_SOURCE) -o $@.step1
	$(HOST_OUT_EXECUTABLES)/conv_linker_config systemprovide --source $@.step1 \
		--output $@ --value "$(STUB_LIBRARIES)" --system "$(TARGET_OUT)"
	$(HOST_OUT_EXECUTABLES)/conv_linker_config append --source $@ --output $@ --key requireLibs \
		--value "$(foreach lib,$(LLNDK_MOVED_TO_APEX_LIBRARIES), $(lib).so)"
	$(HOST_OUT_EXECUTABLES)/conv_linker_config append --source $@ --output $@ --key provideLibs \
		--value "$(foreach lib,$(PRODUCT_EXTRA_STUB_LIBRARIES), $(lib).so)"
	rm -f $@.step1

$(call declare-1p-target,$(SYSTEM_LINKER_CONFIG),)
$(call declare-license-deps,$(SYSTEM_LINKER_CONFIG),$(INTERNAL_SYSTEMIMAGE_FILES) $(SYSTEM_LINKER_CONFIG_SOURCE))