Skip to content

Commit 6f37d75

Browse files
committed
[build-script-helper] Prefer just-built plugins to SDK plugins
Add '-Xswiftc -plugin-path -Xswiftc ${toolchain}/lib/swift/host/plugins' to swiftpm invocations.
1 parent 3fb3a99 commit 6f37d75

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Utilities/build-script-helper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,13 @@ 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+
'-Xswiftc', '-plugin-path',
116+
'-Xswiftc', os.path.join(args.toolchain, 'lib', 'swift', 'host', 'plugins'),
117+
]
118+
else:
113119
swiftpm_args += [
114120
# Dispatch headers
115121
'-Xcxx', '-I', '-Xcxx',

0 commit comments

Comments
 (0)