mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 04:29:42 +00:00
97bc08ae02
We're building tests with -nostdlib which means that we need to explicitly include the builtins library. When using libgcc (default) we can simply include -lgcc_s on the link line, but when using compiler-rt builtins we need a complete path to the builtins library. This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY, so we just need to pass that path to lit and if config.compiler_rt is true, link it to the test. Prior to this patch, running tests when compiler-rt is being used as the builtins library was broken as all tests would fail to link, but with this change running tests when compiler-rt bultins library is being used should be supported. Differential Revision: https://reviews.llvm.org/D56701 llvm-svn: 353208
31 lines
1.7 KiB
INI
31 lines
1.7 KiB
INI
@AUTO_GEN_COMMENT@
|
|
config.cxx_under_test = "@LIBUNWIND_COMPILER@"
|
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
|
config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
|
|
config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
|
|
config.abi_library_path = "@LIBUNWIND_LIBRARY_DIR@"
|
|
config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
|
|
config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
|
|
config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
|
|
config.llvm_unwinder = True
|
|
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@
|
|
config.target_info = "@LIBUNWIND_TARGET_INFO@"
|
|
config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
|
|
config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
|
|
config.executor = "@LIBUNWIND_EXECUTOR@"
|
|
config.libunwind_shared = @LIBUNWIND_ENABLE_SHARED@
|
|
config.enable_shared = @LIBCXX_ENABLE_SHARED@
|
|
config.enable_exceptions = @LIBUNWIND_ENABLE_EXCEPTIONS@
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
|
config.use_target = bool("@LIBUNWIND_TARGET_TRIPLE@")
|
|
config.sysroot = "@LIBUNWIND_SYSROOT@"
|
|
config.gcc_toolchain = "@LIBUNWIND_GCC_TOOLCHAIN@"
|
|
config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@
|
|
|
|
# Let the main config do the real work.
|
|
lit_config.load_config(config, "@LIBUNWIND_SOURCE_DIR@/test/lit.cfg")
|