Skip to content

DO NOT MERGE [build-script] Flip the default value of legacy_impl #21020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
22 changes: 16 additions & 6 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,11 @@ class BuildScriptInvocation(object):
# just invoke cmake from build-script directly rather than futzing
# with build-script-impl. This makes even more sense since there
# really isn't a security issue here.
impl_args += [
"--%s-cmake-options=%s" % (product_name, ' '.join(cmake_opts))
]
if len(cmake_opts) > 0:
impl_args += [
"--%s-cmake-options=%s" %
(product_name, ' '.join(cmake_opts))
]

if args.build_stdlib_deployment_targets:
impl_args += [
Expand Down Expand Up @@ -839,16 +841,20 @@ class BuildScriptInvocation(object):
product_classes.append(products.Swift)
if self.args.build_lldb:
product_classes.append(products.LLDB)
if self.args.build_llbuild:
product_classes.append(products.LLBuild)
if self.args.build_libdispatch:
product_classes.append(products.LibDispatch)
if self.args.build_foundation:
product_classes.append(products.Foundation)
if self.args.build_xctest:
product_classes.append(products.XCTest)
if self.args.build_llbuild:
product_classes.append(products.LLBuild)
if self.args.build_swiftpm:
product_classes.append(products.SwiftPM)
if self.args.build_swiftsyntax:
product_classes.append(products.SwiftSyntax)
if self.args.build_skstresstester:
product_classes.append(products.SKStressTester)
return product_classes

def execute(self):
Expand All @@ -873,7 +879,7 @@ class BuildScriptInvocation(object):
name == "merged-hosts-lipo"), "invalid action"
action_name = name
elif product_class is None:
assert name == "package", "invalid action"
assert name in ("package", "extractsymbols"), "invalid action"
action_name = "{}-{}".format(host.name, name)
else:
assert name is not None, "invalid action"
Expand Down Expand Up @@ -925,6 +931,10 @@ class BuildScriptInvocation(object):
for product_class in product_classes:
execute_one_impl_action(host_target, product_class, "install")

# Extract symbols...
for host_target in all_hosts:
execute_one_impl_action(host_target, name="extractsymbols")

# Package...
for host_target in all_hosts:
execute_one_impl_action(host_target, name="package")
Expand Down
118 changes: 81 additions & 37 deletions utils/build-script-impl

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions utils/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ def create_argument_parser():
option(['-n', '--dry-run'], store_true,
help='print the commands that would be executed, but do not '
'execute them')
option('--no-legacy-impl', store_false('legacy_impl'),
help='avoid legacy implementation')
option('--legacy-impl', store_true('legacy_impl'),
help='use legacy implementation')

option('--build-runtime-with-host-compiler', toggle_true,
help='Use the host compiler, not the self-built one to compile the '
Expand Down
4 changes: 2 additions & 2 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
'install_symroot': None,
'ios': False,
'ios_all': False,
'legacy_impl': True,
'legacy_impl': False,
'libdispatch_build_variant': 'Debug',
'libicu_build_variant': 'Debug',
'lit_args': '-sv',
Expand Down Expand Up @@ -411,7 +411,7 @@ class IgnoreOption(_BaseOption):
SetTrueOption('-n', dest='dry_run'),
SetTrueOption('-p', dest='build_swiftpm'),

SetFalseOption('--no-legacy-impl', dest='legacy_impl'),
SetTrueOption('--legacy-impl', dest='legacy_impl'),

EnableOption('--android'),
EnableOption('--build-external-benchmarks'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
from .lldb import LLDB
from .llvm import LLVM
from .ninja import Ninja
from .skstresstester import SKStressTester
from .swift import Swift
from .swiftpm import SwiftPM
from .swiftsyntax import SwiftSyntax
from .xctest import XCTest

__all__ = [
Expand All @@ -35,4 +37,6 @@
'Swift',
'SwiftPM',
'XCTest',
'SwiftSyntax',
'SKStressTester',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# swift_build_support/products/skstresstester.py -----------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------

from . import product


class SKStressTester(product.Product):
@classmethod
def product_source_name(cls):
"""product_source_name() -> str

The name of the source code directory of this product.
"""
return "swift-stress-tester"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# swift_build_support/products/swiftsyntax.py --------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------

from . import product


class SwiftSyntax(product.Product):
@classmethod
def product_source_name(cls):
"""product_source_name() -> str

The name of the source code directory of this product.
"""
return "swift-syntax"