Skip to content

Commit 8d63791

Browse files
committed
[build-script] Installation support for sourcekit-lsp
Add --install-sourcekit-lsp option to build-script and update presets for package bots to install it. Conflicts: utils/build-script utils/build_swift/driver_arguments.py utils/build_swift/tests/expected_options.py
1 parent 18b465d commit 8d63791

File tree

7 files changed

+21
-1
lines changed

7 files changed

+21
-1
lines changed

utils/build-presets.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ install-xctest
754754
install-libicu
755755
install-prefix=/usr
756756
install-libcxx
757+
install-sourcekit-lsp
757758
build-swift-static-stdlib
758759
build-swift-static-sdk-overlay
759760
build-swift-stdlib-unittest-extra
@@ -1041,7 +1042,6 @@ enable-asan
10411042
indexstore-db=0
10421043
sourcekit-lsp=0
10431044

1044-
10451045
# This does not currently pass due to leakers in the optimizer.
10461046
[preset: buildbot_incremental_linux,lsan,tools=RDA,stdlib=RDA,test=no]
10471047
build-subdir=buildbot_incremental_lsan
@@ -1126,6 +1126,7 @@ install-skstresstester
11261126
install-swiftevolve
11271127
install-playgroundsupport
11281128
install-libcxx
1129+
install-sourcekit-lsp
11291130

11301131
install-destdir=%(install_destdir)s
11311132

utils/build-script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ class BuildScriptInvocation(object):
10161016
host_target, product_name))
10171017
product.do_build(host_target)
10181018
product.do_test(host_target)
1019+
product.install(host_target)
10191020

10201021
# Extract symbols...
10211022
for host_target in all_hosts:

utils/build_swift/driver_arguments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ def create_argument_parser():
553553
help='build IndexStoreDB')
554554
option(['--sourcekit-lsp'], toggle_true('build_sourcekitlsp'),
555555
help='build SourceKitLSP')
556+
option(['--install-sourcekit-lsp'], toggle_true('install_sourcekitlsp'),
557+
help='install SourceKitLSP')
556558

557559
option('--xctest', toggle_true('build_xctest'),
558560
help='build xctest')

utils/build_swift/tests/expected_options.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
'build_swiftevolve': False,
8989
'build_indexstoredb': False,
9090
'build_sourcekitlsp': False,
91+
'install_sourcekitlsp': False,
9192
'build_tvos': True,
9293
'build_tvos_device': False,
9394
'build_tvos_simulator': False,
@@ -450,6 +451,7 @@ class IgnoreOption(_BaseOption):
450451
EnableOption('--libicu', dest='build_libicu'),
451452
EnableOption('--indexstore-db', dest='build_indexstoredb'),
452453
EnableOption('--sourcekit-lsp', dest='build_sourcekitlsp'),
454+
EnableOption('--install-sourcekit-lsp', dest='install_sourcekitlsp'),
453455
EnableOption('--long-test'),
454456
EnableOption('--show-sdks'),
455457
EnableOption('--stress-test'),

utils/swift_build_support/swift_build_support/products/indexstoredb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def do_test(self, host_target):
3434
if self.args.test and self.args.test_indexstoredb:
3535
run_build_script_helper('test', host_target, self, self.args)
3636

37+
def install(self, host_target):
38+
pass
3739

3840
def run_build_script_helper(action, host_target, product, args):
3941
script_path = os.path.join(

utils/swift_build_support/swift_build_support/products/product.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ def do_test(self, host_target):
5757
"""
5858
raise NotImplementedError
5959

60+
def install(self, host_target):
61+
"""install() -> void
62+
63+
Install to the toolchain, for a non-build-script-impl product.
64+
"""
65+
raise NotImplementedError
66+
6067
def __init__(self, args, toolchain, source_dir, build_dir):
6168
self.args = args
6269
self.toolchain = toolchain

utils/swift_build_support/swift_build_support/products/sourcekitlsp.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ def do_test(self, host_target):
3131
if self.args.test and self.args.test_sourcekitlsp:
3232
indexstoredb.run_build_script_helper(
3333
'test', host_target, self, self.args)
34+
35+
def install(self, host_target):
36+
if self.args.install_sourcekitlsp:
37+
indexstoredb.run_build_script_helper(
38+
'install', host_target, self, self.args)

0 commit comments

Comments
 (0)