Skip to content

Commit 602937d

Browse files
committed
Clean up build-script test failures and linter errors
1 parent f2995a3 commit 602937d

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def create_argument_parser():
597597
help='build llbuild')
598598

599599
option(['--back-deploy-concurrency'], toggle_true('build_backdeployconcurrency'),
600-
help='build the concurrency back-deployment libraries')
600+
help='build back-deployment support for concurrency')
601601

602602
option(['--libcxx'], toggle_true('build_libcxx'),
603603
help='build libcxx')

utils/build_swift/tests/expected_options.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
'benchmark_num_onone_iterations': 3,
5757
'build_android': False,
5858
'build_args': [],
59+
'build_backdeployconcurrency': False,
5960
'build_benchmarks': True,
6061
'build_clang_tools_extra': True,
6162
'build_cygwin': True,
@@ -474,6 +475,7 @@ class BuildScriptImplOption(_BaseOption):
474475
SetOption('--skip-test-early-swift-driver',
475476
dest='test_early_swift_driver', value=False),
476477

478+
SetTrueOption('--back-deploy-concurrency', dest='build_backdeployconcurrency'),
477479
SetTrueOption('--benchmark'),
478480
SetTrueOption('--clean'),
479481
SetTrueOption('--dry-run'),

utils/swift_build_support/swift_build_support/build_script_invocation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def convert_to_impl_arguments(self):
234234
if args.swift_disable_dead_stripping:
235235
args.extra_cmake_options.append('-DSWIFT_DISABLE_DEAD_STRIPPING:BOOL=TRUE')
236236
if args.build_backdeployconcurrency:
237-
args.extra_cmake_options.append('-DSWIFT_ALLOW_BACK_DEPLOY_CONCURRENCY:BOOL=TRUE')
237+
args.extra_cmake_options.append(
238+
'-DSWIFT_ALLOW_BACK_DEPLOY_CONCURRENCY:BOOL=TRUE')
238239

239240
# Then add subproject install flags that either skip building them /or/
240241
# if we are going to build them and install_all is set, we also install

utils/swift_build_support/swift_build_support/products/backdeployconcurrency.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,13 @@
1313
import os
1414
import platform
1515

16-
from build_swift.build_swift.constants import MULTIROOT_DATA_FILE_PATH
17-
1816
from . import cmake_product
1917
from . import cmark
20-
from . import foundation
2118
from . import libcxx
22-
from . import libdispatch
2319
from . import libicu
24-
from . import llbuild
2520
from . import llvm
26-
from . import product
2721
from . import swift
28-
from . import swiftpm
29-
from . import swiftsyntax
30-
from . import xctest
31-
from .. import shell
22+
3223

3324
class BackDeployConcurrency(cmake_product.CMakeProduct):
3425
@classmethod
@@ -65,18 +56,22 @@ def build(self, host_target):
6556
self.cmake_options.define(
6657
'TOOLCHAIN_DIR:PATH',
6758
self.install_toolchain_path(host_target))
68-
self.cmake_options.define('SWIFT_NATIVE_SWIFT_TOOLS_PATH:PATH',
69-
os.path.join(self.install_toolchain_path(host_target), 'bin'))
59+
self.cmake_options.define(
60+
'SWIFT_NATIVE_SWIFT_TOOLS_PATH:PATH',
61+
os.path.join(self.install_toolchain_path(host_target), 'bin'))
7062

7163
self.cmake_options.define('SWIFT_EMBED_BITCODE_SECTION:BOOL', True)
7264
self.cmake_options.define('SWIFT_ENABLE_MACCATALYST:BOOL', True)
7365
self.cmake_options.define('CMAKE_CROSSCOMPILING:BOOL', True)
7466

7567
# Only build the back-deployment concurrency library, nothing else
76-
self.cmake_options.define('BUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES:BOOL', True)
68+
self.cmake_options.define(
69+
'BUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES:BOOL', True)
7770
self.cmake_options.define('SWIFT_INCLUDE_TOOLS:BOOL', False)
78-
self.cmake_options.define('SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT:BOOL', False)
79-
self.cmake_options.define('SWIFT_BUILD_TEST_SUPPORT_MODULES:BOOL', False)
71+
self.cmake_options.define(
72+
'SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT:BOOL', False)
73+
self.cmake_options.define(
74+
'SWIFT_BUILD_TEST_SUPPORT_MODULES:BOOL', False)
8075
self.cmake_options.define('SWIFT_BUILD_STDLIB:BOOL', False)
8176
self.cmake_options.define('SWIFT_BUILD_DYNAMIC_STDLIB:BOOL', False)
8277
self.cmake_options.define('SWIFT_BUILD_STATIC_STDLIB:BOOL', False)
@@ -93,8 +88,9 @@ def build(self, host_target):
9388
self.cmake_options.define('SWIFT_INSTALL_COMPONENTS:STRING', 'back-deployment')
9489

9590
# Figure out the SDKs to build.
96-
# NOTE: This normally happens down in build-script-impl, so we have to re-implement the logic here.
97-
sdks_to_build=['OSX']
91+
# NOTE: This normally happens down in build-script-impl, so we have
92+
# to re-implement the logic here.
93+
sdks_to_build = ['OSX']
9894
if self.args.build_ios_device:
9995
sdks_to_build.append('IOS')
10096
if self.args.build_ios_simulator:
@@ -121,11 +117,16 @@ def build(self, host_target):
121117
self.cmake_options.define('CMAKE_INSTALL_PREFIX', "")
122118

123119
# Configure back-deployment targets
124-
self.cmake_options.define('SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX:STRING', '10.15')
125-
self.cmake_options.define('SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS:STRING', '13.0')
126-
self.cmake_options.define('SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST:STRING', '13.0')
127-
self.cmake_options.define('SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS:STRING', '13.0')
128-
self.cmake_options.define('SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS:STRING', '6.0')
120+
self.cmake_options.define(
121+
'SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX:STRING', '10.15')
122+
self.cmake_options.define(
123+
'SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS:STRING', '13.0')
124+
self.cmake_options.define(
125+
'SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST:STRING', '13.0')
126+
self.cmake_options.define(
127+
'SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS:STRING', '13.0')
128+
self.cmake_options.define(
129+
'SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS:STRING', '6.0')
129130

130131
self.build_with_cmake(["back-deployment"], build_variant, [])
131132

0 commit comments

Comments
 (0)