Skip to content

Commit e4d2108

Browse files
committed
Don’t pass -no-toolchain-stdlib-rpath when installing sourcekit-lsp
Since swiftlang/swift-package-manager#4208 SwiftPM no longer adds rpath to the toolchain libraries, so we don’t need to exclude them.
1 parent 3bfb6a5 commit e4d2108

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Utilities/build-script-helper.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,12 @@ def install_binary(exe: str, source_dir: str, install_dir: str, verbose: bool) -
215215

216216

217217
def install(swift_exec: str, args: argparse.Namespace) -> None:
218+
build_single_product('sourcekit-lsp', swift_exec, args)
219+
218220
swiftpm_args = get_swiftpm_options(swift_exec, args)
219221
additional_env = get_swiftpm_environment_variables(swift_exec, args)
220-
221222
bin_path = swiftpm_bin_path(swift_exec, swiftpm_args=swiftpm_args, additional_env=additional_env)
222-
swiftpm_args += ['-Xswiftc', '-no-toolchain-stdlib-rpath']
223-
check_call([
224-
swift_exec, 'build'
225-
] + swiftpm_args, additional_env=additional_env)
226-
227-
if not args.install_prefixes:
228-
args.install_prefixes = [args.toolchain]
229-
223+
230224
for prefix in args.install_prefixes:
231225
install_binary('sourcekit-lsp', bin_path, os.path.join(prefix, 'bin'), verbose=args.verbose)
232226

@@ -296,6 +290,10 @@ def add_common_args(parser: argparse.ArgumentParser) -> None:
296290
args.build_path = os.path.abspath(args.build_path)
297291
args.toolchain = os.path.abspath(args.toolchain)
298292

293+
if args.action == 'install':
294+
if not args.install_prefixes:
295+
args.install_prefixes = [args.toolchain]
296+
299297
return args
300298

301299

0 commit comments

Comments
 (0)