Skip to content

Commit 23c349e

Browse files
committed
Revert "Force enabling SwiftCompilerSources in the build"
This reverts commit 410b81b.
1 parent f10edf2 commit 23c349e

File tree

5 files changed

+31
-14
lines changed

5 files changed

+31
-14
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,6 @@ set(SWIFT_MAIN_INCLUDE_DIR "${SWIFT_SOURCE_DIR}/include")
946946
set(SWIFT_SHIMS_INCLUDE_DIR "${SWIFT_SOURCE_DIR}/stdlib/public/SwiftShims")
947947
set(SWIFT_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
948948

949-
if (NOT BOOTSTRAPPING_MODE)
950-
message(FATAL_ERROR "turning off bootstrapping is not supported anymore")
951-
endif()
952-
953949
# As a temporary workaround, disable SwiftCompilerSources on
954950
# Windows/ARM64 because the compiler segfaults
955951
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")

utils/build-presets.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,15 @@ mixin-preset=
969969
buildbot_linux
970970
mixin_buildbot_linux,no_test
971971

972+
[preset: buildbot_linux,no_test,bootstrapping_off]
973+
mixin-preset=
974+
buildbot_linux,no_test
975+
976+
skip-early-swift-driver
977+
skip-early-swiftsyntax
978+
979+
bootstrapping=off
980+
972981
[preset: buildbot_linux,no_assertions,no_test]
973982
mixin-preset=
974983
buildbot_linux,no_assertions

utils/build-script-impl

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,24 @@ function true_false() {
385385
esac
386386
}
387387

388+
function to_bootstrapping_mode() {
389+
case "$1" in
390+
false | FALSE | 0)
391+
echo "OFF"
392+
;;
393+
true | TRUE | 1 | "")
394+
if [[ "$(uname -s)" == "Darwin" ]] ; then
395+
echo "BOOTSTRAPPING-WITH-HOSTLIBS"
396+
else
397+
echo "BOOTSTRAPPING"
398+
fi
399+
;;
400+
*)
401+
echo `toupper $1`
402+
;;
403+
esac
404+
}
405+
388406
function to_varname() {
389407
# Uses `tr` because it is orders of magnitude faster than ${1//-/_} on long
390408
# strings, which happens when translating KNOWN_SETTINGS.
@@ -1634,13 +1652,6 @@ for host in "${ALL_HOSTS[@]}"; do
16341652
)
16351653
fi
16361654

1637-
if [[ "${BOOTSTRAPPING}" ]] ; then
1638-
swift_cmake_options=(
1639-
"${swift_cmake_options[@]}"
1640-
-DBOOTSTRAPPING_MODE:STRING=`toupper ${BOOTSTRAPPING}`
1641-
)
1642-
fi
1643-
16441655
if [[ "${NATIVE_CLANG_TOOLS_PATH}" ]] ; then
16451656
CLANG_BIN="${NATIVE_CLANG_TOOLS_PATH}"
16461657
if [[ ! -f "${CLANG_BIN}/clang" ]] ; then
@@ -1818,6 +1829,7 @@ for host in "${ALL_HOSTS[@]}"; do
18181829
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -DNDEBUG"
18191830
-DCMAKE_BUILD_TYPE:STRING="${SWIFT_BUILD_TYPE}"
18201831
-DLLVM_ENABLE_ASSERTIONS:BOOL=$(true_false "${SWIFT_ENABLE_ASSERTIONS}")
1832+
-DBOOTSTRAPPING_MODE:STRING=$(to_bootstrapping_mode "${BOOTSTRAPPING}")
18211833
-DSWIFT_ANALYZE_CODE_COVERAGE:STRING=$(toupper "${SWIFT_ANALYZE_CODE_COVERAGE}")
18221834
-DSWIFT_STDLIB_BUILD_TYPE:STRING="${SWIFT_STDLIB_BUILD_TYPE}"
18231835
-DSWIFT_STDLIB_ASSERTIONS:BOOL=$(true_false "${SWIFT_STDLIB_ENABLE_ASSERTIONS}")

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,9 @@ def create_argument_parser():
638638
help='A semi-colon split list of llvm components to install')
639639

640640
option('--bootstrapping', store('bootstrapping_mode'),
641-
choices=['hosttools', 'bootstrapping', 'bootstrapping-with-hostlibs'],
641+
choices=['off', 'hosttools', 'bootstrapping', 'bootstrapping-with-hostlibs'],
642642
help='The bootstrapping build mode for swift compiler modules. '
643-
'Available modes: `hosttools`, `bootstrapping`, '
643+
'Available modes: `off`, `hosttools`, `bootstrapping`, '
644644
'`bootstrapping-with-hostlibs`, `crosscompile`, and '
645645
'`crosscompile-with-hostlibs`')
646646

utils/build_swift/tests/expected_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ class BuildScriptImplOption(_BaseOption):
870870

871871
SetOption('--bootstrapping', dest='bootstrapping_mode'),
872872
ChoicesOption('--bootstrapping', dest='bootstrapping_mode',
873-
choices=['hosttools', 'bootstrapping',
873+
choices=['off', 'hosttools', 'bootstrapping',
874874
'bootstrapping-with-hostlibs']),
875875

876876
# NOTE: We'll need to manually test the behavior of these since they

0 commit comments

Comments
 (0)