File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -594,6 +594,7 @@ class BuildScriptInvocation(object):
594
594
"--swift-stdlib-build-type" , args .swift_stdlib_build_variant ,
595
595
"--lldb-build-type" , args .lldb_build_variant ,
596
596
"--foundation-build-type" , args .foundation_build_variant ,
597
+ "--xctest-build-type" , args .build_variant ,
597
598
"--llvm-enable-assertions" , str (args .llvm_assertions ).lower (),
598
599
"--swift-enable-assertions" , str (args .swift_assertions ).lower (),
599
600
"--swift-stdlib-enable-assertions" , str (
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ KNOWN_SETTINGS=(
85
85
lldb-build-type " Debug" " the CMake build variant for LLDB"
86
86
llbuild-build-type " Debug" " the CMake build variant for llbuild"
87
87
foundation-build-type " Debug" " the build variant for Foundation"
88
+ xctest-build-type " Debug" " the build variant for xctest"
88
89
llbuild-enable-assertions " 1" " enable assertions in llbuild"
89
90
enable-asan " " " enable Address Sanitizer"
90
91
enable-ubsan " " " enable Undefined Behavior Sanitizer"
@@ -2104,13 +2105,19 @@ for host in "${ALL_HOSTS[@]}"; do
2104
2105
copy_swift_stdlib_tool_substitute " $( build_directory_bin ${host} swift) /swift-stdlib-tool"
2105
2106
fi
2106
2107
2107
- # FIXME: Use XCTEST_BUILD_TYPE (which is never properly
2108
- # set) to build either --debug or --release.
2108
+ # Use XCTEST_BUILD_TYPE to build either --debug or --release.
2109
+ if [[ " ${XCTEST_BUILD_TYPE} " == " Debug" ]] ; then
2110
+ XCTEST_BUILD_ARGS=" --debug"
2111
+ else
2112
+ XCTEST_BUILD_ARGS=" --release"
2113
+ fi
2114
+
2109
2115
call " ${XCTEST_SOURCE_DIR} " /build_script.py \
2110
2116
--swiftc=" ${SWIFTC_BIN} " \
2111
2117
--build-dir=" ${XCTEST_BUILD_DIR} " \
2112
2118
--foundation-build-dir=" ${FOUNDATION_BUILD_DIR} /Foundation" \
2113
- $LIBDISPATCH_BUILD_ARGS
2119
+ $LIBDISPATCH_BUILD_ARGS \
2120
+ $XCTEST_BUILD_ARGS
2114
2121
2115
2122
# XCTest builds itself and doesn't rely on cmake
2116
2123
continue
You can’t perform that action at this time.
0 commit comments