Skip to content

Commit 1b73c3e

Browse files
committed
For XCTest to link against libdispatch
1 parent 540a002 commit 1b73c3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build_script.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,14 @@ def build(args):
200200
libdispatch_args=libdispatch_args,
201201
source_paths=" ".join(sourcePaths)))
202202
run("{swiftc} -emit-library {build_dir}/XCTest.o "
203-
"-L {foundation_build_dir} -lswiftGlibc -lswiftCore -lFoundation -lm "
203+
"-L {dispatch_build_dir} -L {foundation_build_dir} -lswiftGlibc -lswiftCore -lFoundation -lm "
204204
# We embed an rpath of `$ORIGIN` to ensure other referenced
205205
# libraries (like `Foundation`) can be found solely via XCTest.
206206
"-Xlinker -rpath=\\$ORIGIN "
207207
"-o {build_dir}/libXCTest.so".format(
208208
swiftc=swiftc,
209209
build_dir=build_dir,
210+
dispatch_build_dir=os.path.join(args.libdispatch_build_dir, 'src', '.libs'),
210211
foundation_build_dir=foundation_build_dir))
211212

212213
# Build the static library.

0 commit comments

Comments
 (0)