Merge "Use generated linker config"
This commit is contained in:
commit
6b0d1cd3ac
1 changed files with 9 additions and 0 deletions
|
@ -91,6 +91,8 @@ static const char* const kLdConfigArchFilePath = "/system/etc/ld.config." ABI_ST
|
|||
static const char* const kLdConfigFilePath = "/system/etc/ld.config.txt";
|
||||
static const char* const kLdConfigVndkLiteFilePath = "/system/etc/ld.config.vndk_lite.txt";
|
||||
|
||||
static const char* const kLdGeneratedConfigFilePath = "/dev/linkerconfig/ld.config.txt";
|
||||
|
||||
#if defined(__LP64__)
|
||||
static const char* const kSystemLibDir = "/system/lib64";
|
||||
static const char* const kOdmLibDir = "/odm/lib64";
|
||||
|
@ -4170,6 +4172,13 @@ static std::string get_ld_config_file_path(const char* executable_path) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// 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", false) &&
|
||||
file_exists(kLdGeneratedConfigFilePath)) {
|
||||
return kLdGeneratedConfigFilePath;
|
||||
}
|
||||
|
||||
std::string path = get_ld_config_file_apex_path(executable_path);
|
||||
if (!path.empty()) {
|
||||
if (file_exists(path.c_str())) {
|
||||
|
|
Loading…
Reference in a new issue