Replace LIB_PATH macro with kLibPath
The string is still "lib" or "lib64" with native bridge. It doesn't need
to be configured in the Android.bp file anymore, so move it to a header
file. This change will ensure that ${LIB} expands to the same thing in
both ld.config.txt and DT_RUN_PATH.
Bug: http://b/145197367
Test: manual
Change-Id: Iab87f3156f2984dd3a20e4ccda423892c8b58763
Merged-In: Iab87f3156f2984dd3a20e4ccda423892c8b58763
diff --git a/linker/linker_config.cpp b/linker/linker_config.cpp
index 85ea8d1..ada25a5 100644
--- a/linker/linker_config.cpp
+++ b/linker/linker_config.cpp
@@ -353,11 +353,6 @@
static constexpr const char* kDefaultConfigName = "default";
static constexpr const char* kPropertyAdditionalNamespaces = "additional.namespaces";
-#if defined(__LP64__)
-static constexpr const char* kLibParamValue = "lib64";
-#else
-static constexpr const char* kLibParamValue = "lib";
-#endif
class Properties {
public:
@@ -401,7 +396,7 @@
split_path(paths_str.c_str(), ":", &paths);
std::vector<std::pair<std::string, std::string>> params;
- params.push_back({ "LIB", kLibParamValue });
+ params.push_back({ "LIB", kLibPath });
if (target_sdk_version_ != 0) {
char buf[16];
async_safe_format_buffer(buf, sizeof(buf), "%d", target_sdk_version_);