Skip to content

[build] Restore previous semantics of stdlib-deployment-targets test #38848

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
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, host_target, args, stage_dependent_args=None):
else:
stdlib_targets_to_build = set(stdlib_targets_to_configure)

if stage_dependent_args.stdlib_deployment_targets and \
if hasattr(stage_dependent_args, 'stdlib_deployment_targets') and \
stage_dependent_args.stdlib_deployment_targets == []:
stdlib_targets_to_configure = []
stdlib_targets_to_build = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ def test_should_only_configure_when_cross_compiling_different_stdlib_targets(sel

self.assertEqual(len(hsc.swift_stdlib_build_targets), 0)

def test_should_not_build_stdlib_when_targets_are_empty(self):
args = self.default_args()
args.host_target = 'macosx-x86_64'
args.stdlib_deployment_targets = []

hsc = HostSpecificConfiguration('macosx-arm64', args)

self.assertEqual(len(hsc.sdks_to_configure), 0)

self.assertEqual(len(hsc.swift_stdlib_build_targets), 0)

def generate_should_skip_building_platform(
host_target, sdk_name, build_target, build_arg_name):
def test(self):
Expand Down