Skip to content

[swift-3.0-preview-2-branch] build-script fixes #3234

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

Merged
merged 2 commits into from
Jun 28, 2016
Merged
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
27 changes: 22 additions & 5 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ class BuildScriptInvocation(object):
if args.build_variant is None:
args.build_variant = "Debug"

# Set the default stdlib-deployment-targets, if none were provided.
if args.stdlib_deployment_targets is None:
stdlib_targets = \
StdlibDeploymentTarget.default_stdlib_deployment_targets()
args.stdlib_deployment_targets = [
target.name for target in stdlib_targets]

# Propagate the default build variant.
if args.cmark_build_variant is None:
args.cmark_build_variant = args.build_variant
Expand Down Expand Up @@ -627,6 +634,11 @@ class BuildScriptInvocation(object):
impl_args += ["--skip-build-swiftpm"]
if args.build_swift_stdlib_unittest_extra:
impl_args += ["--build-swift-stdlib-unittest-extra"]
if args.build_swift_stdlib is not None:
if args.build_swift_stdlib:
impl_args += ["--build-swift-stdlib=1"]
else:
impl_args += ["--build-swift-stdlib=0"]

if args.skip_build_linux:
impl_args += ["--skip-build-linux"]
Expand Down Expand Up @@ -1081,15 +1093,12 @@ details of the setups of other systems or automated environments.""")
"tools for. Can be used multiple times.",
action=arguments.action.concat, type=arguments.type.shell_split,
default=[])
stdlib_targets = StdlibDeploymentTarget.default_stdlib_deployment_targets()
targets_group.add_argument(
"--stdlib-deployment-targets",
help="list of targets to compile or cross-compile the Swift standard "
"library for. %(default)s by default.",
nargs="*",
default=[
target.name
for target in stdlib_targets])
action=arguments.action.concat, type=arguments.type.shell_split,
default=None)
targets_group.add_argument(
"--build-stdlib-deployment-targets",
help="A space-separated list that filters which of the configured "
Expand Down Expand Up @@ -1398,6 +1407,14 @@ details of the setups of other systems or automated environments.""")
"--build-swift-stdlib-unittest-extra",
help="Build optional StdlibUnittest components",
action="store_true")
parser.add_argument(
"--build-swift-stdlib",
help="Whether to build the core standard library",
metavar="BOOL",
nargs='?',
type=arguments.type.bool,
default=None,
const=True)

run_build_group = parser.add_argument_group(
title="Run build")
Expand Down