From b94401e6e15903b64de709fd69863b6880cedd7c Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Mon, 26 Apr 2021 23:06:57 +0100 Subject: Drop ANDROID_ADDITIONAL_PUBLIC_LIBRARIES. It's not needed any more since libarttest(d).so is loaded from the ART linker namespace. Test: art/test/testrunner/testrunner.py --target --64 --optimizing Bug: 130340935 Bug: 167578583 Change-Id: I785133e921277cb25360856e9af20fa681b54a3b --- libnativeloader/public_libraries.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'libnativeloader/public_libraries.cpp') diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp index b565133d6a..827be5b370 100644 --- a/libnativeloader/public_libraries.cpp +++ b/libnativeloader/public_libraries.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -65,11 +64,6 @@ std::string root_dir() { return android_root_env != nullptr ? android_root_env : "/system"; } -bool debuggable() { - static bool debuggable = android::base::GetBoolProperty("ro.debuggable", false); - return debuggable; -} - std::string vndk_version_str(bool use_product_vndk) { if (use_product_vndk) { static std::string product_vndk_version = get_vndk_version(true); @@ -80,16 +74,6 @@ std::string vndk_version_str(bool use_product_vndk) { } } -// For debuggable platform builds use ANDROID_ADDITIONAL_PUBLIC_LIBRARIES environment -// variable to add libraries to the list. This is intended for platform tests only. -std::string additional_public_libraries() { - if (debuggable()) { - const char* val = getenv("ANDROID_ADDITIONAL_PUBLIC_LIBRARIES"); - return val ? val : ""; - } - return ""; -} - // insert vndk version in every {} placeholder void InsertVndkVersionStr(std::string* file_name, bool use_product_vndk) { CHECK(file_name != nullptr); @@ -175,12 +159,6 @@ static std::string InitDefaultPublicLibraries(bool for_preload) { return ""; } - std::string additional_libs = additional_public_libraries(); - if (!additional_libs.empty()) { - auto vec = base::Split(additional_libs, ":"); - std::copy(vec.begin(), vec.end(), std::back_inserter(*sonames)); - } - // If this is for preloading libs, don't remove the libs from APEXes. if (for_preload) { return android::base::Join(*sonames, ':'); @@ -189,11 +167,6 @@ static std::string InitDefaultPublicLibraries(bool for_preload) { // Remove the public libs provided by apexes because these libs are available // from apex namespaces. for (const auto& p : apex_public_libraries()) { - // TODO(b/167578583) remove this `if` block after fixing the bug - // Skip ART APEX to keep behaviors - if (p.first == "com_android_art") { - continue; - } auto public_libs = base::Split(p.second, ":"); sonames->erase(std::remove_if(sonames->begin(), sonames->end(), [&public_libs](const std::string& v) { return std::find(public_libs.begin(), public_libs.end(), v) != public_libs.end(); @@ -472,14 +445,6 @@ Result> ParseApexLibrariesConfig(const std::s } entries[config_line->apex_namespace] = config_line->library_list; } - - // TODO(b/167578583) remove this `if` block after fixing the bug - if (tag == "public") { - std::string additional_libs = additional_public_libraries(); - if (!additional_libs.empty()) { - entries["com_android_art"] += ':' + additional_libs; - } - } return entries; } -- cgit v1.2.3-59-g8ed1b