Skip to content

Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)' #79018

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
Jan 31, 2025
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
2 changes: 1 addition & 1 deletion cmake/modules/DarwinSDKs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64;arm64")
set(SUPPORTED_TVOS_ARCHS "arm64")
set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64;arm64")
set(SUPPORTED_WATCHOS_ARCHS "armv7k;arm64_32")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "x86_64;arm64")
set(SUPPORTED_OSX_ARCHS "x86_64;arm64")
set(SUPPORTED_XROS_ARCHS "arm64;arm64e")
set(SUPPORTED_XROS_SIMULATOR_ARCHS "arm64")
Expand Down
4 changes: 0 additions & 4 deletions cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ function(remove_sdk_unsupported_archs name os sdk_path deployment_version archit
# 32-bit watchOS is not listed explicitly in SDK settings.
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
list(APPEND architectures ${arch})
elseif(arch STREQUAL "i386" AND os STREQUAL "watchsimulator")
# 32-bit watchOS simulator is not listed explicitly in SDK settings.
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
list(APPEND architectures ${arch})
else()
message(STATUS "${name} SDK at ${sdk_path} does not support architecture ${arch}")
endif()
Expand Down
8 changes: 0 additions & 8 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ function verify_host_is_supported() {
| appletvsimulator-x86_64 \
| appletvsimulator-arm64 \
| appletvos-arm64 \
| watchsimulator-i386 \
| watchsimulator-x86_64 \
| watchsimulator-arm64 \
| watchos-armv7k \
Expand Down Expand Up @@ -666,13 +665,6 @@ function set_build_options_for_host() {
SWIFT_HOST_VARIANT_SDK="TVOS"
cmake_osx_deployment_target=""
;;
watchsimulator-i386)
SWIFT_HOST_TRIPLE="i386-apple-watchos${DARWIN_DEPLOYMENT_VERSION_WATCHOS}-simulator"
llvm_target_arch="X86"

SWIFT_HOST_VARIANT_SDK="WATCHOS_SIMULATOR"
cmake_osx_deployment_target=""
;;
watchsimulator-x86_64)
SWIFT_HOST_TRIPLE="x86_64-apple-watchos${DARWIN_DEPLOYMENT_VERSION_WATCHOS}-simulator"
llvm_target_arch="X86"
Expand Down
4 changes: 0 additions & 4 deletions utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,6 @@ def create_argument_parser():
option('--skip-test-ios-simulator',
toggle_false('test_ios_simulator'),
help='skip testing iOS simulator targets')
option('--skip-test-watchos-32bit-simulator',
toggle_false('test_watchos_32bit_simulator'),
default=False,
help='skip testing watchOS 32 bit simulator targets')
option('--skip-test-ios-host',
toggle_false('test_ios_host'),
help='skip testing iOS device targets on the host machine (the '
Expand Down
3 changes: 0 additions & 3 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@
'test_cygwin': False,
'test_freebsd': False,
'test_ios': False,
'test_watchos_32bit_simulator': False,
'test_ios_host': False,
'test_ios_simulator': False,
'test_linux': False,
Expand Down Expand Up @@ -739,8 +738,6 @@ class BuildScriptImplOption(_BaseOption):
DisableOption('--skip-test-cygwin', dest='test_cygwin'),
DisableOption('--skip-test-freebsd', dest='test_freebsd'),
DisableOption('--skip-test-ios', dest='test_ios'),
DisableOption('--skip-test-watchos-32bit-simulator',
dest='test_watchos_32bit_simulator'),
DisableOption('--skip-test-ios-host', dest='test_ios_host'),
DisableOption('--skip-test-ios-simulator', dest='test_ios_simulator'),
DisableOption('--skip-test-linux', dest='test_linux'),
Expand Down
1 change: 0 additions & 1 deletion utils/sil-opt-verify-all-modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def get_verify_resource_dir_modules_commands(
('iphonesimulator', 'x86_64', 'x86_64-apple-ios7.0'),
('macosx', 'x86_64', 'x86_64-apple-macosx10.9'),
('watchos', 'armv7k', 'armv7k-apple-watchos2.0'),
('watchsimulator', 'i386', 'i386-apple-watchos2.0'),
]

commands = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,6 @@ def __platforms_to_skip_test(self, args, stage_dependent_args):

def __platforms_archs_to_skip_test(self, args, stage_dependent_args, host_target):
platforms_archs_to_skip_test = set()
if not stage_dependent_args.test_watchos_32bit_simulator:
platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.AppleWatchSimulator.i386)
if host_target == StdlibDeploymentTarget.OSX.x86_64.name:
platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.iOSSimulator.arm64)
Expand All @@ -341,8 +338,6 @@ def __platforms_archs_to_skip_test(self, args, stage_dependent_args, host_target
StdlibDeploymentTarget.iOSSimulator.x86_64)
platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.AppleTVSimulator.x86_64)
platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.AppleWatchSimulator.i386)
platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.AppleWatchSimulator.x86_64)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,6 @@ def host_cmake_options(self, host_target):
swift_host_variant_sdk = 'TVOS'
cmake_osx_deployment_target = None

elif host_target == 'watchsimulator-i386':
swift_host_triple = 'i386-apple-watchos{}-simulator'.format(
self.args.darwin_deployment_version_watchos)
llvm_target_arch = 'X86'
swift_host_variant_sdk = 'WATCHOS_SIMULATOR'
cmake_osx_deployment_target = None

elif host_target == 'watchsimulator-x86_64':
swift_host_triple = 'x86_64-apple-watchos{}-simulator'.format(
self.args.darwin_deployment_version_watchos)
Expand Down
2 changes: 1 addition & 1 deletion utils/swift_build_support/swift_build_support/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class StdlibDeploymentTarget(object):
sdk_name="WATCHOS")

AppleWatchSimulator = DarwinPlatform("watchsimulator",
archs=["i386", "x86_64", "arm64"],
archs=["x86_64", "arm64"],
sdk_name="WATCHOS_SIMULATOR",
is_simulator=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def test(self):
'build_watchos_device')
test_should_skip_building_watchos_sim =\
generate_should_skip_building_platform(
'watchsimulator-i386',
'watchsimulator-x86_64',
'WATCHOS_SIMULATOR',
'swift-test-stdlib-watchsimulator-i386',
'swift-test-stdlib-watchsimulator-x86_64',
'build_watchos_simulator')

def generate_should_build_full_targets_when_test(test_arg_name):
Expand Down Expand Up @@ -233,7 +233,7 @@ def test(self):
'stress_test')

def generate_should_skip_testing_platform(
host_target, build_arg_name, test_arg_name):
host_target, build_arg_name, test_arg_name, extra_test_arg_name=None):
def test(self):
args = self.default_args()
setattr(args, build_arg_name, True)
Expand All @@ -245,6 +245,8 @@ def test(self):
self.assertEqual(len(before.swift_test_run_targets), 0)

setattr(args, test_arg_name, True)
if extra_test_arg_name is not None:
setattr(args, extra_test_arg_name, True)
after = HostSpecificConfiguration(host_target, args)
self.assertIn('check-swift-{}'.format(host_target),
after.swift_test_run_targets)
Expand Down Expand Up @@ -290,27 +292,10 @@ def test(self):
# NOTE: test_watchos_host is not supported in open-source Swift
test_should_skip_testing_watchos_sim =\
generate_should_skip_testing_platform(
'watchsimulator-i386',
'watchsimulator-x86_64',
'build_watchos_simulator',
'test_watchos_simulator')

def test_should_skip_testing_32bit_watchos(self):
host_target = 'watchsimulator-i386'
args = self.default_args()
args.build_watchos_simulator = True
args.test_watchos_simulator = True
args.test_watchos_32bit_simulator = False
args.host_target = host_target
args.stdlib_deployment_targets = [host_target]
args.build_stdlib_deployment_targets = 'all'

before = HostSpecificConfiguration(host_target, args)
self.assertEqual(len(before.swift_test_run_targets), 0)

args.test_watchos_32bit_simulator = True
after = HostSpecificConfiguration(host_target, args)
self.assertIn('check-swift-watchsimulator-i386',
after.swift_test_run_targets)
'test_watchos_simulator',
'test_watchos_64bit_simulator')

def generate_should_allow_testing_only_host(
host_target, build_arg_name, test_arg_name, host_test_arg_name):
Expand Down Expand Up @@ -681,7 +666,6 @@ def default_args(self):
test_freebsd=False,
test_ios_host=False,
test_ios_simulator=False,
test_watchos_32bit_simulator=True,
test_linux=False,
test_optimize_for_size=False,
test_optimize_none_with_implicit_dynamic=False,
Expand Down