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_soinfo.cpp b/linker/linker_soinfo.cpp
index 14293d9..c71945a 100644
--- a/linker/linker_soinfo.cpp
+++ b/linker/linker_soinfo.cpp
@@ -36,6 +36,7 @@
#include <async_safe/log.h>
+#include "linker_config.h"
#include "linker_debug.h"
#include "linker_globals.h"
#include "linker_logger.h"
@@ -85,11 +86,7 @@
// FIXME: add $PLATFORM.
std::vector<std::pair<std::string, std::string>> params = {
{"ORIGIN", origin},
-#if defined(LIB_PATH)
- {"LIB", LIB_PATH},
-#else
-#error "LIB_PATH not defined"
-#endif
+ {"LIB", kLibPath},
};
for (auto&& s : runpaths) {
format_string(&s, params);