Skip to content

Commit ee6d696

Browse files
authored
Merge pull request #1221 from rintaro/toolchain-plugin
[build-script-helper] Prefer just-built plugins to SDK plugins
2 parents d4b1586 + 555df60 commit ee6d696

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Utilities/build-script-helper.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace, suppress_verb
109109

110110
build_target = get_build_target(swift_exec, args, cross_compile=(True if args.cross_compile_config else False))
111111
build_os = build_target.split('-')[2]
112-
if not build_os.startswith('macosx'):
112+
if build_os.startswith('macosx'):
113+
swiftpm_args += [
114+
# Prefer just-built plugins to SDK plugins.
115+
# This is a workaround for building fat binaries with Xcode build system being old.
116+
'-Xswiftc', '-plugin-path',
117+
'-Xswiftc', os.path.join(args.toolchain, 'lib', 'swift', 'host', 'plugins'),
118+
]
119+
else:
113120
swiftpm_args += [
114121
# Dispatch headers
115122
'-Xcxx', '-I', '-Xcxx',

0 commit comments

Comments
 (0)