Initial commit for Android 11, syncing up to v300.f
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From f287850503008d796b7873e5fc0b06981c2318fe Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 20 Sep 2020 20:53:14 +0200
|
||||
Subject: [PATCH 1/2] Disable vndk.lite
|
||||
|
||||
Change-Id: I129bbee49f6c9b901ca4f5cf55dae2ec36bea107
|
||||
---
|
||||
modules/environment.cc | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules/environment.cc b/modules/environment.cc
|
||||
index e63be71..bc2630b 100644
|
||||
--- a/modules/environment.cc
|
||||
+++ b/modules/environment.cc
|
||||
@@ -24,13 +24,11 @@ namespace android {
|
||||
namespace linkerconfig {
|
||||
namespace modules {
|
||||
bool IsLegacyDevice() {
|
||||
- return (!Variables::GetValue("ro.vndk.version").has_value() &&
|
||||
- !Variables::GetValue("ro.vndk.lite").has_value()) ||
|
||||
- Variables::GetValue("ro.treble.enabled") == "false";
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool IsVndkLiteDevice() {
|
||||
- return Variables::GetValue("ro.vndk.lite").value_or("") == "true";
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool IsVndkInSystemNamespace() {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
From d4880eec8fa830f6c8fe68fe1ebbb05adc5bbbb1 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 28 Sep 2020 21:02:19 +0200
|
||||
Subject: [PATCH 2/2] Add special handling of vndk 26 (remove liblog.so from
|
||||
llndk, it is provided by vndk, and allow linking against libnativeloader)
|
||||
|
||||
Change-Id: I29b0bb6087ba58f69ee6406e003513bceb6785d8
|
||||
---
|
||||
contents/namespace/vendordefault.cc | 16 ++++++++++++++--
|
||||
contents/namespace/vndk.cc | 5 +++++
|
||||
2 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/contents/namespace/vendordefault.cc b/contents/namespace/vendordefault.cc
|
||||
index 6d56904..c93c489 100644
|
||||
--- a/contents/namespace/vendordefault.cc
|
||||
+++ b/contents/namespace/vendordefault.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
// This is the default linker namespace for a vendor process (a process started
|
||||
// from /vendor/bin/*).
|
||||
|
||||
+#include <iostream>
|
||||
#include "linkerconfig/namespacebuilder.h"
|
||||
|
||||
#include "linkerconfig/common.h"
|
||||
@@ -92,7 +93,7 @@ Namespace BuildVendorDefaultNamespace([[maybe_unused]] const Context& ctx) {
|
||||
AsanPath::SAME_PATH);
|
||||
}
|
||||
|
||||
- if (ctx.IsDefaultConfig() && GetVendorVndkVersion() == "27") {
|
||||
+ if (ctx.IsDefaultConfig() && (GetVendorVndkVersion() == "27" || GetVendorVndkVersion()== "26")) {
|
||||
ns.AddSearchPath("/vendor/${LIB}/hw", AsanPath::WITH_DATA_ASAN);
|
||||
ns.AddSearchPath("/vendor/${LIB}/egl", AsanPath::WITH_DATA_ASAN);
|
||||
}
|
||||
@@ -107,9 +108,20 @@ Namespace BuildVendorDefaultNamespace([[maybe_unused]] const Context& ctx) {
|
||||
ns.AddRequires(kVndkLiteVendorRequires);
|
||||
ns.AddProvides(GetSystemStubLibraries());
|
||||
} else {
|
||||
+ auto llndk = Var("LLNDK_LIBRARIES_VENDOR");
|
||||
+ std::cerr << "handing llndk for default vendor namespace" << std::endl;
|
||||
+ if(GetVendorVndkVersion()== "26") {
|
||||
+ std::cerr << "vndk 26" << std::endl;
|
||||
+ std::string lookFor = ":liblog.so";
|
||||
+ std::cerr << "Before " << llndk << std::endl;
|
||||
+
|
||||
+ llndk = llndk.replace(llndk.find(lookFor), lookFor.length(), "");
|
||||
+ std::cerr << "After " << llndk << std::endl;
|
||||
+ }
|
||||
+
|
||||
ns.GetLink(ctx.GetSystemNamespaceName())
|
||||
.AddSharedLib(
|
||||
- {Var("LLNDK_LIBRARIES_VENDOR"), Var("SANITIZER_DEFAULT_VENDOR")});
|
||||
+ {llndk, Var("SANITIZER_DEFAULT_VENDOR")});
|
||||
ns.GetLink("vndk").AddSharedLib({Var("VNDK_SAMEPROCESS_LIBRARIES_VENDOR"),
|
||||
Var("VNDK_CORE_LIBRARIES_VENDOR")});
|
||||
if (android::linkerconfig::modules::IsVndkInSystemNamespace()) {
|
||||
diff --git a/contents/namespace/vndk.cc b/contents/namespace/vndk.cc
|
||||
index a95db80..589f745 100644
|
||||
--- a/contents/namespace/vndk.cc
|
||||
+++ b/contents/namespace/vndk.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
// This namespace is exclusively for vndk-sp libs.
|
||||
|
||||
#include "linkerconfig/environment.h"
|
||||
+using android::linkerconfig::modules::GetVendorVndkVersion;
|
||||
#include "linkerconfig/namespacebuilder.h"
|
||||
|
||||
using android::linkerconfig::modules::AsanPath;
|
||||
@@ -121,6 +122,10 @@ Namespace BuildVndkNamespace([[maybe_unused]] const Context& ctx,
|
||||
|
||||
ns.AddRequires(std::vector{"libneuralnetworks.so"});
|
||||
|
||||
+ if(GetVendorVndkVersion() == "26" || GetVendorVndkVersion() == "27" ) {
|
||||
+ ns.GetLink("com_android_art").AddSharedLib("libnativeloader.so");
|
||||
+ }
|
||||
+
|
||||
return ns;
|
||||
}
|
||||
} // namespace contents
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user