Skip to content

Commit 07d469f

Browse files
authored
Merge pull request #1168 from azarovalex/azarovalex/fix-swift-flags
Clean `swift_flags` array between targets in build-script-helper.py
2 parents e920166 + d4c547b commit 07d469f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Utilities/build-script-helper.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,16 +412,17 @@ def install_include_artifacts(args, toolchain_include_dir, src_include_dir, dst_
412412

413413
def build_using_cmake(args, toolchain_bin, build_dir, targets):
414414
swiftc_exec = os.path.join(toolchain_bin, 'swiftc')
415-
swift_flags = []
415+
base_swift_flags = []
416416
if args.configuration == 'debug':
417-
swift_flags.append('-Onone')
418-
swift_flags.append('-DDEBUG')
417+
base_swift_flags.append('-Onone')
418+
base_swift_flags.append('-DDEBUG')
419419

420420
# Ensure we are not sharing the module cache with concurrent builds in CI
421-
swift_flags.append('-module-cache-path "{}"'.format(os.path.join(build_dir, 'module-cache')))
421+
base_swift_flags.append('-module-cache-path "{}"'.format(os.path.join(build_dir, 'module-cache')))
422422

423-
base_cmake_flags = []
424423
for target in targets:
424+
base_cmake_flags = []
425+
swift_flags = base_swift_flags.copy()
425426
swift_flags.append('-target %s' % target)
426427
if platform.system() == 'Darwin':
427428
base_cmake_flags.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=%s' % macos_deployment_target)

0 commit comments

Comments
 (0)