Skip to content

Commit 7006b57

Browse files
committed
Merge pull request #369 from seabaylea/build-dispatch
Configure use of Dispatch on Linux if included in Foundation
2 parents d598054 + 8e13dbb commit 7006b57

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Utilities/bootstrap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ class Target(object):
176176

177177
# Enable the workaround for SR-1457 until it is fixed.
178178
other_args.extend(["-DEnableWorkaroundForSR1457"])
179+
180+
if args.libdispatch_source_dir:
181+
other_args.extend(["-Xcc", "-fblocks"])
179182

180183
print(" %s:" % json.dumps(compile_swift_node), file=output)
181184
print(" tool: swift-compiler", file=output)
@@ -198,6 +201,11 @@ class Target(object):
198201
"usr/lib/swift/CoreFoundation"))
199202
import_paths.append(os.path.join(args.foundation_path,
200203
"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)
201209
if args.xctest_path:
202210
import_paths.append(args.xctest_path)
203211
print(" import-paths: %s" % json.dumps(import_paths), file=output)
@@ -583,6 +591,10 @@ def main():
583591
help="Path to Foundation build directory")
584592
parser.add_argument("--xctest", dest="xctest_path",
585593
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")
586598
parser.add_argument("--release", action="store_true",
587599
help="Build stage 2 for release")
588600
parser.add_argument("--version-string", dest="version_str",

0 commit comments

Comments
 (0)