From: Eric Fiselier Date: Tue, 17 Mar 2015 18:58:14 +0000 (+0000) Subject: add option to tell LIT where to find the libc++ library when built out of tree X-Git-Tag: llvmorg-3.7.0-rc1~8988 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=426025222228658060bba5aaea98a1bc1b090cb0;p=platform%2Fupstream%2Fllvm.git add option to tell LIT where to find the libc++ library when built out of tree llvm-svn: 232518 --- diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index 813e891..bcc2e6e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -118,6 +118,7 @@ option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF) 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 diff --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py index d08aff8..a8c993f 100644 --- a/libcxxabi/test/libcxxabi/test/config.py +++ b/libcxxabi/test/libcxxabi/test/config.py @@ -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) diff --git a/libcxxabi/test/lit.site.cfg.in b/libcxxabi/test/lit.site.cfg.in index c033dbb..836ad90 100644 --- a/libcxxabi/test/lit.site.cfg.in +++ b/libcxxabi/test/lit.site.cfg.in @@ -5,6 +5,7 @@ config.libcxxabi_obj_root = "@LIBCXXABI_BINARY_DIR@" 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@"