mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[cross-project-tests] Make clang optional if not in LLVM_ENABLE_PROJECTS
Also mark debuginfo_tests as UNSUPPORTED if clang can't be found and remove it from the list of test dependencies if not in LLVM_ENABLE_PROJECTS. Differential Revision: https://reviews.llvm.org/D96511 Reviewed by: aprantl
This commit is contained in:
1 parent
4446a72ad2
commit
3827600ff3
3 files changed
+8
-2
No files matched your search
@@ -15,7 +15,6 @@ set(CROSS_PROJECT_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(CROSS_PROJECT_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(CROSS_PROJECT_TEST_DEPS
|
||||
clang
|
||||
FileCheck
|
||||
count
|
||||
llvm-config
|
||||
@@ -24,6 +23,10 @@ set(CROSS_PROJECT_TEST_DEPS
|
||||
not
|
||||
)
|
||||
|
||||
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS)
|
||||
list(APPEND CROSS_PROJECT_TEST_DEPS clang)
|
||||
endif()
|
||||
|
||||
if ("mlir" IN_LIST LLVM_ENABLE_PROJECTS)
|
||||
add_llvm_executable(check-gdb-mlir-support
|
||||
debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
if 'clang' not in config.available_features:
|
||||
config.unsupported = True
|
||||
@@ -71,7 +71,8 @@ if is_msvc:
|
||||
# use_clang() and use_lld() respectively, so set them to "", if needed.
|
||||
if not hasattr(config, 'clang_src_dir'):
|
||||
config.clang_src_dir = ""
|
||||
llvm_config.use_clang()
|
||||
llvm_config.use_clang(required=('clang' in config.llvm_enabled_projects))
|
||||
|
||||
if not hasattr(config, 'lld_src_dir'):
|
||||
config.lld_src_dir = ""
|
||||
llvm_config.use_lld(required=('lld' in config.llvm_enabled_projects))
|
||||
|
||||
Reference in new issue
Block a user