diff options
author | Evgeny Eltsin <eaeltsin@google.com> | 2019-12-16 19:22:07 +0100 |
---|---|---|
committer | Evgeny Eltsin <eaeltsin@google.com> | 2019-12-16 19:22:07 +0100 |
commit | ff43ec0147e7863378e5878772e5cca3dff9e2de (patch) | |
tree | b7ed9e44d7d55097d652f84a6531fd0a6797b6d1 /linker/linker.cpp | |
parent | a8f98b4fa5a1e40594c0e4a3455c97c4536b764c (diff) |
Prefer arch-specific linker config when available
New linker configuration from /linkerconfig is not suitbale for emulated
architectures. But as of now, native_bridge linkers pick it up as well
and thus fail to find the libraries for emulated architectures.
This is a (temporary) fix so native_bridge linker still picks up
configuration from old location.
Bug: 138920271
Test: native_bridge linker works
Change-Id: I0abbd3e95f9e6830385b0f19db0688e6183030b9
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 4bcb89695..a3bd9641e 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -4082,6 +4082,11 @@ static std::string get_ld_config_file_path(const char* executable_path) { path.c_str(), executable_path); } + path = kLdConfigArchFilePath; + if (file_exists(path.c_str())) { + return path; + } + // Use generated linker config if flag is set // TODO(b/138920271) Do not check property once it is confirmed as stable if (android::base::GetBoolProperty("sys.linker.use_generated_config", true)) { @@ -4093,12 +4098,6 @@ static std::string get_ld_config_file_path(const char* executable_path) { } } - - path = kLdConfigArchFilePath; - if (file_exists(path.c_str())) { - return path; - } - path = get_ld_config_file_vndk_path(); if (file_exists(path.c_str())) { return path; |