Skip to content

Commit c8df11b

Browse files
kateinoigakukunAnka
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 2ce38b3 commit c8df11b

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
@@ -155,8 +155,14 @@ if(NOT SWIFT_INCLUDE_TOOLS)
155155
)
156156
endif()
157157
if(SWIFT_BUILD_STDLIB)
158-
list(APPEND SWIFT_LIT_ARGS
159-
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
158+
# if building only static stdlib, prefer static lib.
159+
if(NOT SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_BUILD_STATIC_STDLIB)
160+
list(APPEND SWIFT_LIT_ARGS
161+
"--param" "test_resource_dir=${SWIFTSTATICLIB_DIR}")
162+
else()
163+
list(APPEND SWIFT_LIT_ARGS
164+
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
165+
endif()
160166
endif()
161167
endif()
162168

0 commit comments

Comments
 (0)