Add product section for product interface enforcement
If ro.product.vndk.version is defined, product partition will have
seprate section from system section.
Modules in /product allowed to use VNDKs only from /system partition.
Modules in /system or /system_ext are not allowed to link to the
libraries in /product.
Bug: 124024578
Bug: 120954888
Test: build with "PRODUCT_PRODUCT_VNDK_VERSION := current"
check device boot and basic functions
Change-Id: I0f9cd8b27c56c6a786b10aa23ffc4b197cea714d
diff --git a/contents/tests/configuration/include/mockenv.h b/contents/tests/configuration/include/mockenv.h
index 2815b4a..8fce4b5 100644
--- a/contents/tests/configuration/include/mockenv.h
+++ b/contents/tests/configuration/include/mockenv.h
@@ -18,26 +18,40 @@
#include "linkerconfig/variables.h"
inline void MockGenericVariables() {
- android::linkerconfig::modules::Variables::AddValue("VNDK_VER", "99");
+ android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION",
+ "99");
+ android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION",
+ "99");
android::linkerconfig::modules::Variables::AddValue("PRODUCT", "product");
android::linkerconfig::modules::Variables::AddValue("SYSTEM_EXT",
"system_ext");
- android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES",
+ android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_VENDOR",
+ "llndk_libraries");
+ android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_PRODUCT",
"llndk_libraries");
android::linkerconfig::modules::Variables::AddValue(
"SANITIZER_RUNTIME_LIBRARIES", "sanitizer_runtime_libraries");
android::linkerconfig::modules::Variables::AddValue(
- "PRIVATE_LLNDK_LIBRARIES", "private_llndk_libraries");
+ "PRIVATE_LLNDK_LIBRARIES_VENDOR", "private_llndk_libraries");
android::linkerconfig::modules::Variables::AddValue(
- "VNDK_SAMEPROCESS_LIBRARIES", "vndk_sameprocess_libraries");
- android::linkerconfig::modules::Variables::AddValue("VNDK_CORE_LIBRARIES",
- "vndk_core_libraries");
+ "PRIVATE_LLNDK_LIBRARIES_PRODUCT", "private_llndk_libraries");
+ android::linkerconfig::modules::Variables::AddValue(
+ "VNDK_SAMEPROCESS_LIBRARIES_VENDOR", "vndk_sameprocess_libraries");
+ android::linkerconfig::modules::Variables::AddValue(
+ "VNDK_SAMEPROCESS_LIBRARIES_PRODUCT", "vndk_sameprocess_libraries");
+ android::linkerconfig::modules::Variables::AddValue(
+ "VNDK_CORE_LIBRARIES_VENDOR", "vndk_core_libraries");
+ android::linkerconfig::modules::Variables::AddValue(
+ "VNDK_CORE_LIBRARIES_PRODUCT", "vndk_core_libraries");
android::linkerconfig::modules::Variables::AddValue(
"VNDK_USING_CORE_VARIANT_LIBRARIES", "");
}
inline void MockVndkVersion(std::string vndk_version) {
- android::linkerconfig::modules::Variables::AddValue("VNDK_VER", vndk_version);
+ android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION",
+ vndk_version);
+ android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION",
+ vndk_version);
}
inline void MockVndkUsingCoreVariant() {
@@ -47,4 +61,4 @@
inline void MockVnkdLite() {
android::linkerconfig::modules::Variables::AddValue("ro.vndk.lite", "true");
-}
\ No newline at end of file
+}