Var("VNDK_SAMEPROCESS_LIBRARIES_VENDOR", ""));
ns.GetLink(ctx.GetSystemNamespaceName())
.AddSharedLib(Var("LLNDK_LIBRARIES_VENDOR", ""));
+ } else {
+ // Add a link for libz.so which is llndk on devices where VNDK is not enforced.
+ ns.GetLink(ctx.GetSystemNamespaceName()).AddSharedLib("libz.so");
}
-
- // Add a link for libz.so which is llndk on devices where VNDK is not enforced.
- ns.GetLink(ctx.GetSystemNamespaceName()).AddSharedLib("libz.so");
} else {
// Once in this namespace, access to libraries in /system/lib is restricted.
// Only libs listed here can be used. Order is important here as the
#include <sstream>
#include <unordered_map>
+#include "linkerconfig/environment.h"
#include "linkerconfig/log.h"
using LibraryList = std::set<std::string>;
}
}
+ // TODO (b/122954981) : Remove this part when VNDK Lite is deprecated
+ // In case of VNDK-lite devices, libz should be included in LLNDK rather than
+ // VNDK-SP libraries
+ if (android::linkerconfig::modules::IsVndkLiteDevice()) {
+ if (file_path.find("llndk") != std::string::npos) {
+ library_list.insert("libz.so");
+ } else if (file_path.find("vndksp") != std::string::npos) {
+ library_list.erase("libz.so");
+ }
+ }
+
library_file_cache.insert({file_path, library_list});
return library_list;