Skip to content

Commit b82173e

Browse files
committed
libswift: if libswift is enabled, add ‘libswift’ to the lit features
This lets tests run conditionally on libswift: // REQUIRES: libswift
1 parent 8080465 commit b82173e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
153153
"--param" "build_mode=${CMAKE_CFG_INTDIR}")
154154
endif()
155155

156+
if(SWIFT_TOOLS_ENABLE_LIBSWIFT)
157+
list(APPEND SWIFT_LIT_ARGS "--param" "libswift")
158+
endif()
159+
156160
if (LLVM_USE_SANITIZER STREQUAL "Address")
157161
set(SWIFT_ASAN_BUILD TRUE)
158162
endif()

test/lit.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ native_swift_tools_path = lit_config.params.get('native_swift_tools_path')
254254
if native_swift_tools_path is not None:
255255
append_to_env_path(native_swift_tools_path)
256256

257+
if lit_config.params.get('libswift', None) is not None:
258+
config.available_features.add('libswift')
259+
257260
###
258261

259262
# Discover the Swift binaries to use.

0 commit comments

Comments
 (0)