Skip to content
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

[5.10] Use new SwiftPM flag to remove $ORIGIN from installed sourcekit-lsp ELF executable runpath #913

Merged
merged 1 commit into from Oct 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions Utilities/build-script-helper.py
Expand Up @@ -124,6 +124,8 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace) -> List[str]:
'-Xcxx', '-I', '-Xcxx',
os.path.join(args.toolchain, 'lib', 'swift', 'Block'),
]
if args.action == 'install':
swiftpm_args += ['--disable-local-rpath']

if '-android' in build_target:
swiftpm_args += [
Expand Down Expand Up @@ -181,6 +183,9 @@ def get_swiftpm_environment_variables(swift_exec: str, args: argparse.Namespace)
if args.action == 'test' and not args.skip_long_tests:
env['SOURCEKIT_LSP_ENABLE_LONG_TESTS'] = '1'

if args.action == 'install':
env['SOURCEKIT_LSP_CI_INSTALL'] = "1"

return env


Expand All @@ -190,8 +195,6 @@ def build_single_product(product: str, swift_exec: str, args: argparse.Namespace
"""
swiftpm_args = get_swiftpm_options(swift_exec, args)
additional_env = get_swiftpm_environment_variables(swift_exec, args)
if args.action == 'install':
additional_env['SOURCEKIT_LSP_CI_INSTALL'] = "1"
cmd = [swift_exec, 'build', '--product', product] + swiftpm_args
check_call(cmd, additional_env=additional_env, verbose=args.verbose)

Expand Down