diff options
author | Kiyoung Kim <kiyoungkim@google.com> | 2019-12-16 01:55:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-16 01:55:44 +0000 |
commit | 838ca10715d8c66aee9cf849c5056b6f3a38e47c (patch) | |
tree | 1992b08b5e6cea63d6ffcfe3b01beb56ac4bb7a3 /linker/linker.cpp | |
parent | 0c42fa49565526f7b7214d18e4069a98b98d9a28 (diff) | |
parent | ef04c80bf6416e2169a9d5d501f13c340b5949e9 (diff) |
Merge "Enable linker configuration from generator by default"
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 2f5232769..4bcb89695 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -4054,19 +4054,6 @@ static std::string get_ld_config_file_vndk_path() { return kLdConfigVndkLiteFilePath; } - // Use generated linker config if flag is set - // TODO(b/138920271) Do not check property once it is confirmed as stable - // TODO(b/139638519) This file should also cover legacy or vndk-lite config - if (android::base::GetProperty("ro.vndk.version", "") != "" && - android::base::GetBoolProperty("sys.linker.use_generated_config", true)) { - if (file_exists(kLdGeneratedConfigFilePath)) { - return kLdGeneratedConfigFilePath; - } else { - DL_WARN("Warning: failed to find generated linker configuration from \"%s\"", - kLdGeneratedConfigFilePath); - } - } - std::string ld_config_file_vndk = kLdConfigFilePath; size_t insert_pos = ld_config_file_vndk.find_last_of('.'); if (insert_pos == std::string::npos) { @@ -4095,6 +4082,18 @@ static std::string get_ld_config_file_path(const char* executable_path) { path.c_str(), executable_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)) { + if (file_exists(kLdGeneratedConfigFilePath)) { + return kLdGeneratedConfigFilePath; + } else { + DL_WARN("Warning: failed to find generated linker configuration from \"%s\"", + kLdGeneratedConfigFilePath); + } + } + + path = kLdConfigArchFilePath; if (file_exists(path.c_str())) { return path; |