diff --git a/utils/build-script b/utils/build-script index c0493460bc626..043b0df37bc0e 100755 --- a/utils/build-script +++ b/utils/build-script @@ -354,16 +354,15 @@ def apply_default_arguments(toolchain, args): # Filter out any macOS stdlib deployment targets that are not supported # by the macOS SDK. - if platform.system() == "Darwin": - targets = StdlibDeploymentTarget.get_targets_by_name( - args.stdlib_deployment_targets) - args.stdlib_deployment_targets = [ - target.name - for target in targets - if (target.platform.is_darwin and - target.platform.sdk_supports_architecture( - target.arch, args.darwin_xcrun_toolchain)) - ] + targets = StdlibDeploymentTarget.get_targets_by_name( + args.stdlib_deployment_targets) + args.stdlib_deployment_targets = [ + target.name + for target in targets + if (not target.platform.is_darwin or + target.platform.sdk_supports_architecture( + target.arch, args.darwin_xcrun_toolchain)) + ] # Include the Darwin module-only architectures in the CMake options. if args.swift_darwin_module_archs: