[libcxx-commits] [libcxx] ddacd37 - [libc++] Do not set the runtime library path with DYLD_LIBRARY_PATH

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 15 11:09:58 PDT 2020


Author: Louis Dionne
Date: 2020-05-15T14:09:40-04:00
New Revision: ddacd370c568da6629a6664452a672b95dc539d5

URL: https://github.com/llvm/llvm-project/commit/ddacd370c568da6629a6664452a672b95dc539d5
DIFF: https://github.com/llvm/llvm-project/commit/ddacd370c568da6629a6664452a672b95dc539d5.diff

LOG: [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

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py
    libcxx/utils/libcxx/test/target_info.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 6456620f9652..a20206caff62 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -883,7 +883,6 @@ def configure_deployment(self):
             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 503954d345ff..9b6697b612a5 100644
--- a/libcxx/utils/libcxx/test/target_info.py
+++ b/libcxx/utils/libcxx/test/target_info.py
@@ -37,7 +37,6 @@ def add_locale_features(self, features):
 
     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 @@ def add_cxx_compile_flags(self, flags):
     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.


        


More information about the libcxx-commits mailing list