in build-script-helper.py [0:0]
def invoke_swift_single_product(package_path, swift_exec, action, product, build_path, multiroot_data_file, configuration, env, verbose):
args = [swift_exec, action, '--package-path', package_path, '-c', configuration, '--build-path', build_path]
if platform.system() != "Darwin":
args.extend(["--enable-test-discovery"])
if multiroot_data_file:
args.extend(['--multiroot-data-file', multiroot_data_file])
if action == 'test':
args.extend(['--test-product', product])
else:
args.extend(['--product', product])
# Tell SwiftSyntax that we are building in a build-script environment so that
# it does not need to be rebuilt if it has already been built before.
env['SWIFT_BUILD_SCRIPT_ENVIRONMENT'] = '1'
check_call(args, env=env, verbose=verbose)