Skip to content

Commit

Permalink
Merge pull request #894 from finagolfin/origin
Browse files Browse the repository at this point in the history
Use new SwiftPM flag to remove `$ORIGIN` from installed sourcekit-lsp ELF executable runpath
  • Loading branch information
ahoppen authored Oct 20, 2023
2 parents 5c22189 + 3292aed commit 2476f02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
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 args.skip_long_tests:
env['SKIP_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

0 comments on commit 2476f02

Please sign in to comment.