Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -30,6 +30,7 @@ pythonize_bool(LIBCXX_GENERATE_COVERAGE) pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) +pythonize_bool(LIBCXX_USE_COMPILER_RT) pythonize_bool(LIBCXX_HAS_ATOMIC_LIB) pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB) pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) Index: test/lit.site.cfg.in =================================================================== --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -24,6 +24,7 @@ config.target_info = "@LIBCXX_TARGET_INFO@" config.executor = "@LIBCXX_EXECUTOR@" config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" +config.compiler_rt = "@LIBCXX_USE_COMPILER_RT@" config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@" config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@" config.debug_build = "@LIBCXX_DEBUG_BUILD@" Index: utils/libcxx/test/target_info.py =================================================================== --- utils/libcxx/test/target_info.py +++ utils/libcxx/test/target_info.py @@ -234,7 +234,9 @@ flags += ['-lunwind', '-ldl'] else: flags += ['-lgcc_s'] - flags += ['-lgcc'] + compiler_rt = self.full_config.get_lit_bool('compiler_rt', False) + if not compiler_rt: + flags += ['-lgcc'] use_libatomic = self.full_config.get_lit_bool('use_libatomic', False) if use_libatomic: flags += ['-latomic']