@@ -228,6 +228,7 @@ class Target(object):
228
228
link_input_nodes .append (compile_swift_node )
229
229
230
230
other_args .extend (["-swift-version" , "4" ])
231
+ other_args .extend (["-module-cache-path" , os .path .join (args .sandbox_path , "ModuleCache" )])
231
232
232
233
print (" %s:" % json .dumps (compile_swift_node ), file = output )
233
234
print (" tool: swift-compiler" , file = output )
@@ -285,6 +286,8 @@ class Target(object):
285
286
link_input_nodes , predecessor_node ):
286
287
287
288
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
+
288
291
if platform .system () == 'Darwin' :
289
292
common_args .extend (["-arch" , "x86_64" , "-mmacosx-version-min=10.10" ])
290
293
@@ -1028,6 +1031,7 @@ def main():
1028
1031
1029
1032
build_path = os .path .join (g_project_root , args .build_path )
1030
1033
sandbox_path = os .path .join (build_path , ".bootstrap" )
1034
+ args .sandbox_path = sandbox_path
1031
1035
target_path = os .path .join (build_path , build_target )
1032
1036
1033
1037
libdir = os .path .join (target_path , "lib" )
0 commit comments