Skip to content

Commit 410b81b

Browse files
committed
Force enabling SwiftCompilerSources in the build
This means that `bootstrapping=off` cannot be used anymore.
1 parent db50797 commit 410b81b

File tree

5 files changed

+14
-31
lines changed

5 files changed

+14
-31
lines changed

CMakeLists.txt

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

900+
if (NOT BOOTSTRAPPING_MODE)
901+
message(FATAL_ERROR "turning off bootstrapping is not supported anymore")
902+
endif()
903+
900904
set(SWIFT_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin")
901905
set(SWIFT_LIBRARY_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib")
902906
if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")

utils/build-presets.ini

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -952,15 +952,6 @@ mixin-preset=
952952
buildbot_linux
953953
mixin_buildbot_linux,no_test
954954

955-
[preset: buildbot_linux,no_test,bootstrapping_off]
956-
mixin-preset=
957-
buildbot_linux,no_test
958-
959-
skip-early-swift-driver
960-
skip-early-swiftsyntax
961-
962-
bootstrapping=off
963-
964955
[preset: buildbot_linux,no_assertions,no_test]
965956
mixin-preset=
966957
buildbot_linux,no_assertions

utils/build-script-impl

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -379,24 +379,6 @@ function true_false() {
379379
esac
380380
}
381381

382-
function to_bootstrapping_mode() {
383-
case "$1" in
384-
false | FALSE | 0)
385-
echo "OFF"
386-
;;
387-
true | TRUE | 1 | "")
388-
if [[ "$(uname -s)" == "Darwin" ]] ; then
389-
echo "BOOTSTRAPPING-WITH-HOSTLIBS"
390-
else
391-
echo "BOOTSTRAPPING"
392-
fi
393-
;;
394-
*)
395-
echo `toupper $1`
396-
;;
397-
esac
398-
}
399-
400382
function to_varname() {
401383
# Uses `tr` because it is orders of magnitude faster than ${1//-/_} on long
402384
# strings, which happens when translating KNOWN_SETTINGS.
@@ -1628,6 +1610,13 @@ for host in "${ALL_HOSTS[@]}"; do
16281610
)
16291611
fi
16301612

1613+
if [[ "${BOOTSTRAPPING}" ]] ; then
1614+
swift_cmake_options=(
1615+
"${swift_cmake_options[@]}"
1616+
-DBOOTSTRAPPING_MODE:STRING=`toupper ${BOOTSTRAPPING}`
1617+
)
1618+
fi
1619+
16311620
if [[ "${NATIVE_CLANG_TOOLS_PATH}" ]] ; then
16321621
CLANG_BIN="${NATIVE_CLANG_TOOLS_PATH}"
16331622
if [[ ! -f "${CLANG_BIN}/clang" ]] ; then
@@ -1785,7 +1774,6 @@ for host in "${ALL_HOSTS[@]}"; do
17851774
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -DNDEBUG"
17861775
-DCMAKE_BUILD_TYPE:STRING="${SWIFT_BUILD_TYPE}"
17871776
-DLLVM_ENABLE_ASSERTIONS:BOOL=$(true_false "${SWIFT_ENABLE_ASSERTIONS}")
1788-
-DBOOTSTRAPPING_MODE:STRING=$(to_bootstrapping_mode "${BOOTSTRAPPING}")
17891777
-DSWIFT_ANALYZE_CODE_COVERAGE:STRING=$(toupper "${SWIFT_ANALYZE_CODE_COVERAGE}")
17901778
-DSWIFT_STDLIB_BUILD_TYPE:STRING="${SWIFT_STDLIB_BUILD_TYPE}"
17911779
-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
@@ -622,9 +622,9 @@ def create_argument_parser():
622622
help='A semi-colon split list of llvm components to install')
623623

624624
option('--bootstrapping', store('bootstrapping_mode'),
625-
choices=['off', 'hosttools', 'bootstrapping', 'bootstrapping-with-hostlibs'],
625+
choices=['hosttools', 'bootstrapping', 'bootstrapping-with-hostlibs'],
626626
help='The bootstrapping build mode for swift compiler modules. '
627-
'Available modes: `off`, `hosttools`, `bootstrapping`, '
627+
'Available modes: `hosttools`, `bootstrapping`, '
628628
'`bootstrapping-with-hostlibs`, `crosscompile`, and '
629629
'`crosscompile-with-hostlibs`')
630630

utils/build_swift/tests/expected_options.py

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

839839
SetOption('--bootstrapping', dest='bootstrapping_mode'),
840840
ChoicesOption('--bootstrapping', dest='bootstrapping_mode',
841-
choices=['off', 'hosttools', 'bootstrapping',
841+
choices=['hosttools', 'bootstrapping',
842842
'bootstrapping-with-hostlibs']),
843843

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

0 commit comments

Comments
 (0)