From ddacd370c568da6629a6664452a672b95dc539d5 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 15 May 2020 13:54:23 -0400 Subject: [PATCH] [libc++] Do not set the runtime library path with DYLD_LIBRARY_PATH We already set it using -rpath when linking test executables, and using DYLD_LIBRARY_PATH causes problems when running other commands that shouldn't run against the just-built libc++ (e.g. `ls` in a ShTest). rdar://63241847 --- libcxx/utils/libcxx/test/config.py | 1 - libcxx/utils/libcxx/test/target_info.py | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 6456620..a20206c 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -883,7 +883,6 @@ class Configuration(object): self.cxx.compile_flags += ['-D_LIBCPP_DISABLE_AVAILABILITY'] def configure_env(self): - self.target_info.configure_env(self.exec_env) self.config.environment = dict(os.environ) def add_path(self, dest_env, new_path): diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py index 503954d..9b6697b 100644 --- a/libcxx/utils/libcxx/test/target_info.py +++ b/libcxx/utils/libcxx/test/target_info.py @@ -37,7 +37,6 @@ class DefaultTargetInfo(object): def add_cxx_compile_flags(self, flags): pass def add_cxx_link_flags(self, flags): pass - def configure_env(self, env): pass def allow_cxxabi_link(self): return True def use_lit_shell_default(self): return False @@ -157,18 +156,6 @@ class DarwinLocalTI(DefaultTargetInfo): def add_cxx_link_flags(self, flags): flags += ['-lSystem'] - def configure_env(self, env): - library_paths = [] - # Configure the library path for libc++ - if self.full_config.cxx_runtime_root: - library_paths += [self.full_config.cxx_runtime_root] - - # Configure the abi library path - if self.full_config.abi_library_root: - library_paths += [self.full_config.abi_library_root] - if library_paths: - env['DYLD_LIBRARY_PATH'] = ':'.join(library_paths) - def allow_cxxabi_link(self): # Don't link libc++abi explicitly on OS X because the symbols # should be available in libc++ directly. -- 2.7.4