Skip to content

Commit 0591975

Browse files
authored
test/CMakeLists.txt: set correct resources path for static stdlib (#67629)
For platforms that support only static stdlib (i.e. `if(NOT SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_BUILD_STATIC_STDLIB)` we should set `test_resource_dir` value correctly to use the `swift_static` subdirectory.
1 parent b92530f commit 0591975

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
@@ -152,8 +152,14 @@ if(NOT SWIFT_INCLUDE_TOOLS)
152152
)
153153
endif()
154154
if(SWIFT_BUILD_STDLIB)
155-
list(APPEND SWIFT_LIT_ARGS
156-
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
155+
# If building only static stdlib, use `swift_static` resources directory.
156+
if(NOT SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_BUILD_STATIC_STDLIB)
157+
list(APPEND SWIFT_LIT_ARGS
158+
"--param" "test_resource_dir=${SWIFTSTATICLIB_DIR}")
159+
else()
160+
list(APPEND SWIFT_LIT_ARGS
161+
"--param" "test_resource_dir=${SWIFTLIB_DIR}")
162+
endif()
157163
endif()
158164
endif()
159165

0 commit comments

Comments
 (0)