Skip to content

Commit 7e5bc63

Browse files
committed
[build-script-helper] Use separate module cache
This will ensure that multiple build jobs running in parallel on the same machine (like it could be the case in CI) do not interfere with each other. Addresses rdar://71373849
1 parent 6bede3a commit 7e5bc63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ def build_using_cmake(args, toolchain_bin, build_dir):
382382
else:
383383
swift_flags.append('-O')
384384

385+
# Ensure we are not sharing the module cache with concurrent builds in CI
386+
swift_flags.append('-module-cache-path "{}"'.format(os.path.join(build_dir, 'module-cache')))
387+
385388
for target in targets:
386389
swift_flags.append('-target %s' % target)
387390
base_cmake_flags = ['-DCMAKE_Swift_FLAGS=' + ' '.join(swift_flags)]

0 commit comments

Comments
 (0)