Skip to content

Commit 900de58

Browse files
authored
Merge pull request llvm#10601 from chelcassanova/cherry/6.2/add-clang-resource-dir-to-cmake-cache
[lldb][cmake] Add clang resource dir to LLDB shell tests config (llvm#136
2 parents b270006 + fd9fde6 commit 900de58

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,17 @@ if(LLDB_ENABLE_SWIFT_SUPPORT)
229229
endif()
230230
endif()
231231

232+
if(LLDB_BUILT_STANDALONE)
233+
if (TARGET clang-resource-headers)
234+
get_target_property(CLANG_RESOURCE_DIR clang-resource-headers INTERFACE_INCLUDE_DIRECTORIES)
235+
set(CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}/..")
236+
else()
237+
set(CLANG_RESOURCE_DIR "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}")
238+
endif()
239+
else()
240+
get_clang_resource_dir(CLANG_RESOURCE_DIR PREFIX "${CMAKE_BINARY_DIR}")
241+
endif()
242+
232243
# GCC silently accepts any -Wno-<foo> option, but warns about those options
233244
# being unrecognized only if the compilation triggers other warnings to be
234245
# printed. Therefore, check for whether the compiler supports options in the

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

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

3738
import lit.llvm
3839
lit.llvm.initialize(lit_config, config)

0 commit comments

Comments
 (0)