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

Commit 49bf691c authored by Jooyung Han's avatar Jooyung Han
Browse files

Remove the old output of conv_linker_config

With 3397b6a2aadf8c2eb808fa38f7d6c07d5c82f320 in build/soong,
conv_linker_config fails when the output exists.

For system/vendor partitions, linker.config.pb files are built by
a custom rule, which is missing the removal of the old output. It would
fail with incremental build.

We could fix this by adding --force to overwrite. But I just added `rm`
following the convention in Makefile.

Bug: n/a
Test: m && (touch input of /vendor/etc/linker.config.pb)
      m (again)
Change-Id: Iaeaf861e90b9535394d94c6b16229a4f566789d5
parent cee4ebf1
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -3132,6 +3132,9 @@ 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): 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) \
		--output $@ --value "$(STUB_LIBRARIES)" --system "$(TARGET_OUT)"
	$(HOST_OUT_EXECUTABLES)/conv_linker_config append --source $@ --output $@ --key requireLibs \
@@ -3517,6 +3520,9 @@ endif
vendor_linker_config_file := $(TARGET_OUT_VENDOR)/etc/linker.config.pb
$(vendor_linker_config_file): private_linker_config_fragments := $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS)
$(vendor_linker_config_file): $(INTERNAL_VENDORIMAGE_FILES) $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS) | $(HOST_OUT_EXECUTABLES)/conv_linker_config
	@echo Creating linker config: $@
	@mkdir -p $(dir $@)
	@rm -f $@
	$(HOST_OUT_EXECUTABLES)/conv_linker_config proto \
		--source $(call normalize-path-list,$(private_linker_config_fragments)) \
		--output $@