From 94ede2dcce1e6dcbb6ad6d9e3bfae9eff911d7aa Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Fri, 15 Sep 2023 14:50:16 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20set=20`SWIFT=5FBUILD=5FSCRIPT?= =?UTF-8?q?=5FENVIRONMENT`=20when=20building=20swift-format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `SWIFT_BUILD_SCRIPT_ENVIRONMENT` should only be set when building swift-syntax. All other projects should be building swift-syntax without any swift-syntax-specific environment variables set. Also remove `SWIFT_SYNTAX_PARSER_LIB_SEARCH_PATH`, which isn’t needed anymore since we re-wrote the parser in Swift and we no longer have the C++ parser library. --- build-script-helper.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build-script-helper.py b/build-script-helper.py index 34df715..e1ea7a6 100755 --- a/build-script-helper.py +++ b/build-script-helper.py @@ -74,8 +74,7 @@ def run(args): if not args.no_local_deps: env['SWIFTCI_USE_LOCAL_DEPS'] = "1" env['SWIFT_STRESS_TESTER_SOURCEKIT_SEARCHPATH'] = args.sourcekitd_dir - env['SWIFT_SYNTAX_PARSER_LIB_SEARCH_PATH'] = os.path.join(args.toolchain, 'lib', 'swift', 'macosx') - + if args.update: print("** Updating dependencies of %s **" % package_name) handle_errors(update_swiftpm_dependencies, @@ -192,10 +191,6 @@ def invoke_swift_single_product(package_dir, swift_exec, action, product, build_ else: args.extend(['--product', product]) - # Tell SwiftSyntax that we are building in a build-script environment so that - # it does not need to rebuilt if it has already been built before. - env['SWIFT_BUILD_SCRIPT_ENVIRONMENT'] = '1' - check_call(args, env=env, verbose=verbose)