[libcxxabi] r232518 - add option to tell LIT where to find the libc++ library when built out of tree

Eric Fiselier eric at efcs.ca
Tue Mar 17 11:58:14 PDT 2015


Author: ericwf
Date: Tue Mar 17 13:58:14 2015
New Revision: 232518

URL: http://llvm.org/viewvc/llvm-project?rev=232518&view=rev
Log:
add option to tell LIT where to find the libc++ library when built out of tree

Modified:
    libcxxabi/trunk/CMakeLists.txt
    libcxxabi/trunk/test/libcxxabi/test/config.py
    libcxxabi/trunk/test/lit.site.cfg.in

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=232518&r1=232517&r2=232518&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Tue Mar 17 13:58:14 2015
@@ -118,6 +118,7 @@ option(LIBCXXABI_USE_LLVM_UNWINDER "Buil
 option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)
 set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE STRING "GCC toolchain for cross compiling.")
 set(LIBCXXABI_SYSROOT "" CACHE STRING "Sysroot for cross compiling.")
+set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE STRING "The path to libc++ library.")
 
 # Default to building a shared library so that the default options still test
 # the libc++abi that is being built. There are two problems with testing a

Modified: libcxxabi/trunk/test/libcxxabi/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/libcxxabi/test/config.py?rev=232518&r1=232517&r2=232518&view=diff
==============================================================================
--- libcxxabi/trunk/test/libcxxabi/test/config.py (original)
+++ libcxxabi/trunk/test/libcxxabi/test/config.py Tue Mar 17 13:58:14 2015
@@ -76,5 +76,10 @@ class Configuration(LibcxxConfiguration)
         self.cxx.link_flags += ['-lc++abi']
 
     def configure_env(self):
-        if sys.platform == 'darwin' and self.libcxxabi_lib_root:
-            self.env['DYLD_LIBRARY_PATH'] = self.libcxxabi_lib_root
+        library_paths = []
+        if self.libcxxabi_lib_root:
+            library_paths += [self.libcxxabi_lib_root]
+        if self.cxx_library_root:
+            library_paths += [self.cxx_library_root]
+        if sys.platform == 'darwin' and library_paths:
+            self.env['DYLD_LIBRARY_PATH'] = ':'.join(library_paths)

Modified: libcxxabi/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.site.cfg.in?rev=232518&r1=232517&r2=232518&view=diff
==============================================================================
--- libcxxabi/trunk/test/lit.site.cfg.in (original)
+++ libcxxabi/trunk/test/lit.site.cfg.in Tue Mar 17 13:58:14 2015
@@ -5,6 +5,7 @@ config.libcxxabi_obj_root       = "@LIBC
 config.libcxxabi_lib_root       = "@LIBCXXABI_LIBRARY_DIR@"
 config.libcxx_src_root          = "@LIBCXXABI_LIBCXX_PATH@"
 config.cxx_headers              = "@LIBCXXABI_LIBCXX_INCLUDES@"
+config.cxx_library_root         = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
 config.llvm_unwinder            = "@LIBCXXABI_USE_LLVM_UNWINDER@"
 config.enable_threads           = "@LIBCXXABI_ENABLE_THREADS@"
 config.use_sanitizer            = "@LLVM_USE_SANITIZER@"





More information about the cfe-commits mailing list