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

Commit 9e9970d7 authored by Doheon Lee's avatar Doheon Lee Committed by android-build-team Robot
Browse files

Determine product partition path on build time

Path of product partitoin can be set as /product or /system/product
whether generate extra product partition or not.
Substitute %PRODUCT% to relevant path to know linker which path should
search and permit.

Bug: 110286945
Test: m -j # Check /system/etc/ld.config.$(PLATFORM_VNDK_VERSION).txt
Change-Id: I6ca177d0c9c5af00ad821879fece40848331fc8d
Merged-In: I6ca177d0c9c5af00ad821879fece40848331fc8d
(cherry picked from commit cccad0bf)
(cherry picked from commit 93d837f3)
parent 987e94eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ $(2): $(1)
	$$(hide) sed -i -e 's?%VNDK_CORE_LIBRARIES%?$$(PRIVATE_VNDK_CORE_LIBRARIES)?g' $$@
	$$(hide) sed -i -e 's?%SANITIZER_RUNTIME_LIBRARIES%?$$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES)?g' $$@
	$$(hide) sed -i -e 's?%VNDK_VER%?$$(PRIVATE_VNDK_VERSION)?g' $$@
	$$(hide) sed -i -e 's?%PRODUCT%?$$(TARGET_COPY_OUT_PRODUCT)?g' $$@

llndk_libraries_list :=
vndksp_libraries_list :=
+12 −20
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
# absolute path of an executable is selected.
dir.system = /system/bin/
dir.system = /system/xbin/
dir.system = /product/bin/
dir.system = /%PRODUCT%/bin/

dir.vendor = /odm/bin/
dir.vendor = /vendor/bin/
@@ -39,7 +39,7 @@ additional.namespaces = sphal,vndk,rs
namespace.default.isolated = true

namespace.default.search.paths  = /system/${LIB}
namespace.default.search.paths += /product/${LIB}
namespace.default.search.paths += /%PRODUCT%/${LIB}

# We can't have entire /system/${LIB} as permitted paths because doing so
# makes it possible to load libs in /system/${LIB}/vndk* directories by
@@ -51,8 +51,7 @@ namespace.default.search.paths += /product/${LIB}
namespace.default.permitted.paths  = /system/${LIB}/drm
namespace.default.permitted.paths += /system/${LIB}/extractors
namespace.default.permitted.paths += /system/${LIB}/hw
namespace.default.permitted.paths += /product/${LIB}
namespace.default.permitted.paths += /system/product/${LIB}
namespace.default.permitted.paths += /%PRODUCT%/${LIB}
# These are where odex files are located. libart has to be able to dlopen the files
namespace.default.permitted.paths += /system/framework
namespace.default.permitted.paths += /system/app
@@ -64,12 +63,9 @@ namespace.default.permitted.paths += /odm/framework
namespace.default.permitted.paths += /odm/app
namespace.default.permitted.paths += /odm/priv-app
namespace.default.permitted.paths += /oem/app
namespace.default.permitted.paths += /product/framework
namespace.default.permitted.paths += /product/app
namespace.default.permitted.paths += /product/priv-app
namespace.default.permitted.paths += /system/product/framework
namespace.default.permitted.paths += /system/product/app
namespace.default.permitted.paths += /system/product/priv-app
namespace.default.permitted.paths += /%PRODUCT%/framework
namespace.default.permitted.paths += /%PRODUCT%/app
namespace.default.permitted.paths += /%PRODUCT%/priv-app
namespace.default.permitted.paths += /data
namespace.default.permitted.paths += /mnt/expand

@@ -92,14 +88,10 @@ namespace.default.asan.permitted.paths += /odm/framework
namespace.default.asan.permitted.paths += /odm/app
namespace.default.asan.permitted.paths += /odm/priv-app
namespace.default.asan.permitted.paths += /oem/app
namespace.default.asan.permitted.paths += /product/${LIB}
namespace.default.asan.permitted.paths += /product/framework
namespace.default.asan.permitted.paths += /product/app
namespace.default.asan.permitted.paths += /product/priv-app
namespace.default.asan.permitted.paths += /system/product/${LIB}
namespace.default.asan.permitted.paths += /system/product/framework
namespace.default.asan.permitted.paths += /system/product/app
namespace.default.asan.permitted.paths += /system/product/priv-app
namespace.default.asan.permitted.paths += /%PRODUCT%/${LIB}
namespace.default.asan.permitted.paths += /%PRODUCT%/framework
namespace.default.asan.permitted.paths += /%PRODUCT%/app
namespace.default.asan.permitted.paths += /%PRODUCT%/priv-app
namespace.default.asan.permitted.paths += /mnt/expand

###############################################################################
@@ -335,7 +327,7 @@ namespace.vndk.link.default.allow_all_shared_libs = true
namespace.system.isolated = false

namespace.system.search.paths  = /system/${LIB}
namespace.system.search.paths += /product/${LIB}
namespace.system.search.paths += /%PRODUCT%/${LIB}

namespace.system.asan.search.paths  = /data/asan/system/${LIB}
namespace.system.asan.search.paths +=           /system/${LIB}
@@ -353,4 +345,4 @@ namespace.system.asan.search.paths += /product/${LIB}
[postinstall]
namespace.default.isolated = false
namespace.default.search.paths  = /system/${LIB}
namespace.default.search.paths += /product/${LIB}
namespace.default.search.paths += /%PRODUCT%/${LIB}