lit.site.cfg.in 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @AUTO_GEN_COMMENT@
  2. import os
  3. import site
  4. config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
  5. config.project_obj_root = "@CMAKE_BINARY_DIR@"
  6. config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
  7. config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
  8. config.abi_library_root = "@LIBUNWIND_LIBRARY_DIR@"
  9. config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
  10. config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
  11. config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
  12. config.llvm_unwinder = True
  13. config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@"
  14. config.enable_threads = @LIBUNWIND_ENABLE_THREADS@
  15. config.use_sanitizer = "@LLVM_USE_SANITIZER@"
  16. config.enable_32bit = @LIBUNWIND_BUILD_32_BITS@
  17. config.target_info = "@LIBUNWIND_TARGET_INFO@"
  18. config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
  19. config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
  20. config.executor = "@LIBUNWIND_EXECUTOR@"
  21. config.libunwind_shared = @LIBUNWIND_ENABLE_SHARED@
  22. config.enable_shared = @LIBCXX_ENABLE_SHARED@
  23. config.arm_ehabi = @LIBUNWIND_USES_ARM_EHABI@
  24. config.host_triple = "@LLVM_HOST_TRIPLE@"
  25. if "@TARGET_TRIPLE@":
  26. config.target_triple = "@TARGET_TRIPLE@"
  27. config.sysroot = "@LIBUNWIND_SYSROOT@"
  28. config.gcc_toolchain = "@LIBUNWIND_GCC_TOOLCHAIN@"
  29. config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@
  30. site.addsitedir(os.path.join(config.libunwind_src_root, 'test'))
  31. site.addsitedir(os.path.join(config.libcxx_src_root, 'utils'))
  32. # name: The name of this test suite.
  33. config.name = 'libunwind'
  34. # suffixes: A list of file extensions to treat as test files.
  35. config.suffixes = ['.cpp', '.s']
  36. # test_source_root: The root path where tests are located.
  37. config.test_source_root = os.path.join(config.libunwind_src_root, 'test')
  38. # Allow expanding substitutions that are based on other substitutions
  39. config.recursiveExpansionLimit = 10
  40. # Infer the test_exec_root from the build directory.
  41. config.test_exec_root = os.path.join(config.libunwind_obj_root, 'test')
  42. import libcxx.test.format
  43. config.test_format = libcxx.test.format.CxxStandardLibraryTest()
  44. lit_config.note('Using configuration variant: libunwind')
  45. import libunwind.test.config
  46. configuration = libunwind.test.config.Configuration(lit_config, config)
  47. configuration.configure()
  48. configuration.print_config_info()