@@ -215,18 +215,12 @@ def install_binary(exe: str, source_dir: str, install_dir: str, verbose: bool) -
215
215
216
216
217
217
def install (swift_exec : str , args : argparse .Namespace ) -> None :
218
+ build_single_product ('sourcekit-lsp' , swift_exec , args )
219
+
218
220
swiftpm_args = get_swiftpm_options (swift_exec , args )
219
221
additional_env = get_swiftpm_environment_variables (swift_exec , args )
220
-
221
222
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
+
230
224
for prefix in args .install_prefixes :
231
225
install_binary ('sourcekit-lsp' , bin_path , os .path .join (prefix , 'bin' ), verbose = args .verbose )
232
226
@@ -296,6 +290,10 @@ def add_common_args(parser: argparse.ArgumentParser) -> None:
296
290
args .build_path = os .path .abspath (args .build_path )
297
291
args .toolchain = os .path .abspath (args .toolchain )
298
292
293
+ if args .action == 'install' :
294
+ if not args .install_prefixes :
295
+ args .install_prefixes = [args .toolchain ]
296
+
299
297
return args
300
298
301
299
0 commit comments