@@ -176,6 +176,9 @@ class Target(object):
176
176
177
177
# Enable the workaround for SR-1457 until it is fixed.
178
178
other_args .extend (["-DEnableWorkaroundForSR1457" ])
179
+
180
+ if args .libdispatch_source_dir :
181
+ other_args .extend (["-Xcc" , "-fblocks" ])
179
182
180
183
print (" %s:" % json .dumps (compile_swift_node ), file = output )
181
184
print (" tool: swift-compiler" , file = output )
@@ -198,6 +201,11 @@ class Target(object):
198
201
"usr/lib/swift/CoreFoundation" ))
199
202
import_paths .append (os .path .join (args .foundation_path ,
200
203
"usr/lib/swift" ))
204
+ if args .libdispatch_build_dir :
205
+ import_paths .append (os .path .join (args .libdispatch_build_dir ,
206
+ "src" ))
207
+ if args .libdispatch_source_dir :
208
+ import_paths .append (args .libdispatch_source_dir )
201
209
if args .xctest_path :
202
210
import_paths .append (args .xctest_path )
203
211
print (" import-paths: %s" % json .dumps (import_paths ), file = output )
@@ -583,6 +591,10 @@ def main():
583
591
help = "Path to Foundation build directory" )
584
592
parser .add_argument ("--xctest" , dest = "xctest_path" ,
585
593
help = "Path to XCTest build directory" )
594
+ parser .add_argument ("--libdispatch-build-dir" , dest = "libdispatch_build_dir" ,
595
+ help = "Path to the libdispatch build directory" )
596
+ parser .add_argument ("--libdispatch-source-dir" , dest = "libdispatch_source_dir" ,
597
+ help = "Path to the libdispatch source directory" )
586
598
parser .add_argument ("--release" , action = "store_true" ,
587
599
help = "Build stage 2 for release" )
588
600
parser .add_argument ("--version-string" , dest = "version_str" ,
0 commit comments