Skip to content

Commit 867b650

Browse files
committed
Don’t set SWIFT_BUILD_SCRIPT_ENVIRONMENT when building swift-format
Setting `SWIFT_BUILD_SCRIPT_ENVIRONMENT` entails that we e.g. enable assertions in swift-syntax, even in release mode, which we don’t want since the copy of swift-format that we include in the toolchain is also built using this script and shouldn’t have these swift-syntax’s assertions enabled, to improve performance.
1 parent e1b18cf commit 867b650

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

build-script-helper.py

-3
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ def get_swiftpm_options(package_path, build_path, multiroot_data_file, configura
176176
return args
177177

178178
def get_swiftpm_environment_variables(no_local_deps):
179-
# Tell SwiftSyntax that we are building in a build-script environment so that
180-
# it does not need to be rebuilt if it has already been built before.
181179
env = dict(os.environ)
182-
env['SWIFT_BUILD_SCRIPT_ENVIRONMENT'] = '1'
183180
if not no_local_deps:
184181
env['SWIFTCI_USE_LOCAL_DEPS'] = "1"
185182
return env

0 commit comments

Comments
 (0)