Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ sourcekit-lsp
# swift-inspect
swiftsyntax
swiftsyntax-verify-generated-files
swiftformat

skstresstester
swiftevolve
Expand Down Expand Up @@ -623,6 +624,7 @@ llbuild
swiftpm
swiftsyntax
swiftsyntax-verify-generated-files
swiftformat
swift-driver
indexstore-db
sourcekit-lsp
Expand Down Expand Up @@ -824,6 +826,7 @@ install-xctest
install-libicu
install-prefix=/usr
install-sourcekit-lsp
install-swiftformat
install-swiftdocc
build-swift-static-stdlib
build-swift-static-sdk-overlay
Expand Down Expand Up @@ -1118,6 +1121,7 @@ foundation
libdispatch
swiftsyntax
swiftsyntax-verify-generated-files
swiftformat
indexstore-db
sourcekit-lsp
install-llvm
Expand Down Expand Up @@ -1236,6 +1240,7 @@ swift-driver
# Failing to build in CI: rdar://78408440
# swift-inspect
swiftsyntax
swiftformat
playgroundsupport
libcxx
indexstore-db
Expand Down Expand Up @@ -1285,6 +1290,7 @@ install-swiftsyntax
install-playgroundsupport
install-libcxx
install-sourcekit-lsp
install-swiftformat
install-back-deploy-concurrency
install-swiftdocc

Expand Down Expand Up @@ -1393,6 +1399,7 @@ skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-swiftformat
skip-test-skstresstester
skip-test-swiftevolve
skip-test-swiftdocc
Expand Down Expand Up @@ -1432,6 +1439,7 @@ skip-test-lldb
skip-test-cmark
skip-test-playgroundsupport
skip-test-swiftsyntax
skip-test-swiftformat
skip-test-skstresstester
skip-test-swiftevolve
skip-test-swiftdocc
Expand Down Expand Up @@ -1576,6 +1584,7 @@ swiftpm
# swift-inspect
swift-driver
swiftsyntax
swiftformat
swiftdocc

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
Expand Down Expand Up @@ -1808,6 +1817,7 @@ release
assertions
swiftsyntax
swiftsyntax-verify-generated-files
swiftformat
skstresstester
swiftevolve

Expand All @@ -1817,6 +1827,7 @@ release
assertions
swiftsyntax
swiftsyntax-verify-generated-files
swiftformat

#===------------------------------------------------------------------------===#
# Test Swift Format
Expand Down
2 changes: 2 additions & 0 deletions utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ def create_argument_parser():
'match the ones that would be generated from current main')
option(['--install-sourcekit-lsp'], toggle_true('install_sourcekitlsp'),
help='install SourceKitLSP')
option(['--install-swiftformat'], toggle_true('install_swiftformat'),
help='install SourceKitLSP')
option(['--install-skstresstester'], toggle_true('install_skstresstester'),
help='install the SourceKit stress tester')
option(['--install-swift-driver'], toggle_true('install_swift_driver'),
Expand Down
2 changes: 2 additions & 0 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
'swiftsyntax_verify_generated_files': False,
'install_playgroundsupport': False,
'install_sourcekitlsp': False,
'install_swiftformat': False,
'install_skstresstester': False,
'install_swiftevolve': False,
'build_toolchainbenchmarks': False,
Expand Down Expand Up @@ -586,6 +587,7 @@ class BuildScriptImplOption(_BaseOption):
EnableOption('--install-swiftpm', dest='install_swiftpm'),
EnableOption('--install-swift-driver', dest='install_swift_driver'),
EnableOption('--install-sourcekit-lsp', dest='install_sourcekitlsp'),
EnableOption('--install-swiftformat', dest='install_swiftformat'),
EnableOption('--install-skstresstester', dest='install_skstresstester'),
EnableOption('--install-swiftevolve', dest='install_swiftevolve'),
EnableOption('--install-swiftdocc', dest='install_swiftdocc'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def run_build_script_helper(self, action, host_target, additional_params=[]):
script_path = os.path.join(
self.source_dir, 'build-script-helper.py')

install_destdir = self.host_install_destdir(host_target)

configuration = 'release' if self.is_release() else 'debug'

helper_cmd = [
Expand All @@ -68,6 +70,9 @@ def run_build_script_helper(self, action, host_target, additional_params=[]):
# reset the dependencies to be local.
'--update'
]
helper_cmd.extend([
'--prefix', install_destdir + self.args.install_prefix
])
if self.args.verbose_build:
helper_cmd.append('--verbose')
helper_cmd.extend(additional_params)
Expand All @@ -87,7 +92,10 @@ def test(self, host_target):
self.run_build_script_helper('test', host_target)

def should_install(self, host_target):
return False
return self.args.install_swiftformat

def install(self, host_target):
self.run_build_script_helper('install', host_target)

@classmethod
def get_dependencies(cls):
Expand Down