Index: libcxx/docs/TestingLibcxx.rst =================================================================== --- libcxx/docs/TestingLibcxx.rst +++ libcxx/docs/TestingLibcxx.rst @@ -183,6 +183,14 @@ option is specified or the environment variable LIBCXX_COLOR_DIAGNOSTICS is present then color diagnostics will be enabled. +.. option:: llvm_unwinder + + Enable the use of LLVM unwinder instead of libgcc. + +.. option:: builtins_library + + Path to the builtins library to use instead of libgcc. + Environment Variables --------------------- Index: libcxx/test/lit.site.cfg.in =================================================================== --- libcxx/test/lit.site.cfg.in +++ libcxx/test/lit.site.cfg.in @@ -27,7 +27,7 @@ config.executor = "@LIBCXX_EXECUTOR@" config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" -config.compiler_rt = "@LIBCXX_USE_COMPILER_RT@" +config.builtins_library = "@LIBCXX_BUILTINS_LIBRARY@" config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@" config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@" config.debug_build = "@LIBCXX_DEBUG_BUILD@" Index: libcxx/utils/libcxx/test/target_info.py =================================================================== --- libcxx/utils/libcxx/test/target_info.py +++ libcxx/utils/libcxx/test/target_info.py @@ -251,8 +251,10 @@ flags += ['-lunwind', '-ldl'] else: flags += ['-lgcc_s'] - compiler_rt = self.full_config.get_lit_bool('compiler_rt', False) - if not compiler_rt: + builtins_lib = self.full_config.get_lit_conf('builtins_library') + if builtins_lib: + flags += [builtins_lib] + else: flags += ['-lgcc'] use_libatomic = self.full_config.get_lit_bool('use_libatomic', False) if use_libatomic: Index: libcxxabi/test/lit.site.cfg.in =================================================================== --- libcxxabi/test/lit.site.cfg.in +++ libcxxabi/test/lit.site.cfg.in @@ -9,6 +9,7 @@ config.libunwind_headers = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@" config.cxx_library_root = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@" config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" +config.builtins_library = "@LIBCXXABI_BUILTINS_LIBRARY@" config.enable_threads = "@LIBCXXABI_ENABLE_THREADS@" config.use_sanitizer = "@LLVM_USE_SANITIZER@" config.sanitizer_library = "@LIBCXXABI_SANITIZER_LIBRARY@" Index: libunwind/test/lit.site.cfg.in =================================================================== --- libunwind/test/lit.site.cfg.in +++ libunwind/test/lit.site.cfg.in @@ -8,6 +8,7 @@ config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include" config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@" config.llvm_unwinder = "1" +config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@" config.enable_threads = "@LIBUNWIND_ENABLE_THREADS@" config.use_sanitizer = "@LLVM_USE_SANITIZER@" config.enable_32bit = "@LIBUNWIND_BUILD_32_BITS@"