Skip to content

Commit d5760f9

Browse files
committed
[lldb][cmake] Add clang resource dir to LLDB shell tests config
We want to be able to access the Clang resources directory in LLDB shell tests, this commit adds the ability to do this by adding the `CLANG_RESOURCE_DIR` CMake variable to the config for LLDB lit tests
1 parent 6f1adbd commit d5760f9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lldb/test/Shell/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
add_custom_target(lldb-shell-test-deps)
22
set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests")
33
add_dependencies(lldb-shell-test-deps lldb-test-depends)
4+
get_target_property(clang_resource_headers_dir clang-resource-headers INTERFACE_INCLUDE_DIRECTORIES)
5+
set(CLANG_RESOURCE_DIR ${clang_resource_headers_dir})
46

57
add_lit_testsuites(LLDB-SHELL
68
${CMAKE_CURRENT_SOURCE_DIR}

lldb/test/Shell/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
3535
# The shell tests use their own module caches.
3636
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
3737
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")
38+
config.clang_resource_dir = os.path.join("@CLANG_RESOURCE_DIR@")
3839

3940
import lit.llvm
4041
lit.llvm.initialize(lit_config, config)

0 commit comments

Comments
 (0)