Skip to content

Commit 4d3ba5b

Browse files
kateinoigakukunrunner
authored andcommitted
[test][static-stdlib] Test with swift_static when building only static stdlib
This patch makes the test suite use `lib/swift_static` instead of `lib/swift` when building only static stdlib.
1 parent 92cd7c5 commit 4d3ba5b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,14 @@ if(NOT SWIFT_INCLUDE_TOOLS)
150150
)
151151
endif()
152152
if(SWIFT_BUILD_STDLIB)
153-
list(APPEND SWIFT_LIT_ARGS
154-
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
153+
# if building only static stdlib, prefer static lib.
154+
if(NOT SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_BUILD_STATIC_STDLIB)
155+
list(APPEND SWIFT_LIT_ARGS
156+
"--param" "test_resource_dir=${SWIFTSTATICLIB_DIR}")
157+
else()
158+
list(APPEND SWIFT_LIT_ARGS
159+
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
160+
endif()
155161
endif()
156162
endif()
157163

0 commit comments

Comments
 (0)