Remove ld.config.txt from prebuilts build rule
Starting from the P VNDK snapshot, the linker config file will be
built and installed from the source tree at the time the VNDK
snapshot is installed to the system.img (of Q+), rather than
installing the prebuilt from /prebuilts/vndk/v{VER}. The installed
linker config file is used for both system and vendor processes,
thus should be built from the most up-to-date ld.config.txt
template in the source tree of the system partition.
Test: python gen_buildfiles.py 28 -vv
Test: m -j vndk_v28_arm64; check /system/etc/ld.config.28.txt
Bug: 74658756
Merged-In: I86034e6bbbab6a096814389332c26920ef7d40fc
Change-Id: I86034e6bbbab6a096814389332c26920ef7d40fc
(cherry picked from commit e020f7131ea8b6c403d11f0804bd9076af89f8d1)
diff --git a/vndk/snapshot/gen_buildfiles.py b/vndk/snapshot/gen_buildfiles.py
index b16118e..212e41f 100644
--- a/vndk/snapshot/gen_buildfiles.py
+++ b/vndk/snapshot/gen_buildfiles.py
@@ -119,6 +119,12 @@
self._vndk_version))
etc_buildrules = []
for prebuilt in self.ETC_MODULES:
+ # Starting from P (VNDK version >= 28), ld.config.VER.txt is not
+ # installed as a prebuilt but is built and installed from the
+ # source tree at the time the VNDK snapshot is installed to the
+ # system.img.
+ if prebuilt == 'ld.config.txt' and self._vndk_version >= 28:
+ continue
etc_buildrules.append(self._gen_etc_prebuilt(prebuilt))
with open(self._mkfile, 'w') as mkfile: