Skip to content

Commit 1149899

Browse files
committed
[bootstrap] Don't use global module cache when bootstrapping
<rdar://problem/50385698> (cherry picked from commit c82d593)
1 parent a465d93 commit 1149899

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Utilities/bootstrap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class Target(object):
228228
link_input_nodes.append(compile_swift_node)
229229

230230
other_args.extend(["-swift-version", "4"])
231+
other_args.extend(["-module-cache-path", os.path.join(args.sandbox_path, "ModuleCache")])
231232

232233
print(" %s:" % json.dumps(compile_swift_node), file=output)
233234
print(" tool: swift-compiler", file=output)
@@ -285,6 +286,8 @@ class Target(object):
285286
link_input_nodes, predecessor_node):
286287

287288
common_args = ["-fobjc-arc", "-fmodule-name=%s" % self.module_name()]
289+
common_args.extend(["-fmodules-cache-path=%s" % os.path.join(args.sandbox_path, "ModuleCache")])
290+
288291
if platform.system() == 'Darwin':
289292
common_args.extend(["-arch", "x86_64", "-mmacosx-version-min=10.10"])
290293

@@ -1028,6 +1031,7 @@ def main():
10281031

10291032
build_path = os.path.join(g_project_root, args.build_path)
10301033
sandbox_path = os.path.join(build_path, ".bootstrap")
1034+
args.sandbox_path = sandbox_path
10311035
target_path = os.path.join(build_path, build_target)
10321036

10331037
libdir = os.path.join(target_path, "lib")

0 commit comments

Comments
 (0)