Skip to content

[build-script-helper] Prefer just-built plugins to SDK plugins #1221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace, suppress_verb

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