mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Xcode 14 beta 4 no longer supports iOS armv7, armv7s, and i386 architectures
> Building iOS projects with deployment targets for the armv7, armv7s, and i386 architectures is no longer supported. (92831716)
This commit is contained in:
@@ -106,7 +106,7 @@ endmacro()
|
||||
|
||||
macro(configure_sdks_darwin)
|
||||
set(macosx_arch "x86_64" "arm64")
|
||||
set(iphoneos_arch "arm64" "arm64e" "armv7")
|
||||
set(iphoneos_arch "arm64" "arm64e")
|
||||
set(appletvos_arch "arm64")
|
||||
set(watchos_arch "armv7k" "arm64_32")
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ option(SWIFT_ENABLE_IOS32
|
||||
TRUE)
|
||||
|
||||
if(SWIFT_ENABLE_IOS32)
|
||||
set(SUPPORTED_IOS_ARCHS "armv7;armv7s;arm64;arm64e")
|
||||
set(SUPPORTED_IOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
|
||||
set(SUPPORTED_IOS_ARCHS "arm64;arm64e")
|
||||
set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64;arm64")
|
||||
else()
|
||||
set(SUPPORTED_IOS_ARCHS "arm64;arm64e")
|
||||
set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64;arm64")
|
||||
|
||||
@@ -86,10 +86,6 @@ function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
|
||||
foreach(arch ${${architectures_var}})
|
||||
if(sdk_supported_archs MATCHES "${arch}\n")
|
||||
list(APPEND architectures ${arch})
|
||||
elseif(arch MATCHES "^armv7(s)?$" AND os STREQUAL "iphoneos")
|
||||
# 32-bit iOS 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 "iphonesimulator")
|
||||
# 32-bit iOS simulator is not listed explicitly in SDK settings.
|
||||
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
|
||||
|
||||
@@ -465,11 +465,8 @@ function verify_host_is_supported() {
|
||||
| macosx-x86_64 \
|
||||
| macosx-arm64 \
|
||||
| macosx-arm64e \
|
||||
| iphonesimulator-i386 \
|
||||
| iphonesimulator-x86_64 \
|
||||
| iphonesimulator-arm64 \
|
||||
| iphoneos-armv7 \
|
||||
| iphoneos-armv7s \
|
||||
| iphoneos-arm64 \
|
||||
| iphoneos-arm64e \
|
||||
| appletvsimulator-x86_64 \
|
||||
@@ -597,13 +594,6 @@ function set_build_options_for_host() {
|
||||
SWIFT_HOST_VARIANT_ARCH="arm64e"
|
||||
cmake_osx_deployment_target="${DARWIN_DEPLOYMENT_VERSION_OSX}"
|
||||
;;
|
||||
iphonesimulator-i386)
|
||||
SWIFT_HOST_TRIPLE="i386-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}-simulator"
|
||||
llvm_target_arch="X86"
|
||||
|
||||
SWIFT_HOST_VARIANT_SDK="IOS_SIMULATOR"
|
||||
cmake_osx_deployment_target=""
|
||||
;;
|
||||
iphonesimulator-x86_64)
|
||||
SWIFT_HOST_TRIPLE="x86_64-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}-simulator"
|
||||
llvm_target_arch="X86"
|
||||
@@ -626,20 +616,6 @@ function set_build_options_for_host() {
|
||||
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
|
||||
)
|
||||
;;
|
||||
iphoneos-armv7)
|
||||
SWIFT_HOST_TRIPLE="armv7-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
|
||||
llvm_target_arch="ARM"
|
||||
|
||||
SWIFT_HOST_VARIANT_SDK="IOS"
|
||||
cmake_osx_deployment_target=""
|
||||
;;
|
||||
iphoneos-armv7s)
|
||||
SWIFT_HOST_TRIPLE="armv7s-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
|
||||
llvm_target_arch="ARM"
|
||||
|
||||
SWIFT_HOST_VARIANT_SDK="IOS"
|
||||
cmake_osx_deployment_target=""
|
||||
;;
|
||||
iphoneos-arm64)
|
||||
SWIFT_HOST_TRIPLE="arm64-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
|
||||
llvm_target_arch="AArch64"
|
||||
|
||||
@@ -1103,10 +1103,6 @@ def create_argument_parser():
|
||||
option('--skip-test-ios-simulator',
|
||||
toggle_false('test_ios_simulator'),
|
||||
help='skip testing iOS simulator targets')
|
||||
option('--skip-test-ios-32bit-simulator',
|
||||
toggle_false('test_ios_32bit_simulator'),
|
||||
default=False,
|
||||
help='skip testing iOS 32 bit simulator targets')
|
||||
option('--skip-test-watchos-32bit-simulator',
|
||||
toggle_false('test_watchos_32bit_simulator'),
|
||||
default=False,
|
||||
|
||||
@@ -641,8 +641,6 @@ EXPECTED_OPTIONS = [
|
||||
DisableOption('--skip-test-cygwin', dest='test_cygwin'),
|
||||
DisableOption('--skip-test-freebsd', dest='test_freebsd'),
|
||||
DisableOption('--skip-test-ios', dest='test_ios'),
|
||||
DisableOption('--skip-test-ios-32bit-simulator',
|
||||
dest='test_ios_32bit_simulator'),
|
||||
DisableOption('--skip-test-watchos-32bit-simulator',
|
||||
dest='test_watchos_32bit_simulator'),
|
||||
DisableOption('--skip-test-ios-host', dest='test_ios_host'),
|
||||
|
||||
@@ -59,10 +59,7 @@ def get_verify_resource_dir_modules_commands(
|
||||
known_platforms = [
|
||||
('appletvos', 'arm64', 'arm64-apple-tvos9.0'),
|
||||
('appletvsimulator', 'x86_64', 'x86_64-apple-tvos9.0'),
|
||||
('iphoneos', 'armv7', 'armv7-apple-ios7.0'),
|
||||
('iphoneos', 'armv7s', 'armv7s-apple-ios7.0'),
|
||||
('iphoneos', 'arm64', 'arm64-apple-ios7.0'),
|
||||
('iphonesimulator', 'i386', 'i386-apple-ios7.0'),
|
||||
('iphonesimulator', 'x86_64', 'x86_64-apple-ios7.0'),
|
||||
('macosx', 'x86_64', 'x86_64-apple-macosx10.9'),
|
||||
('watchos', 'armv7k', 'armv7k-apple-watchos2.0'),
|
||||
|
||||
@@ -300,9 +300,6 @@ class HostSpecificConfiguration(object):
|
||||
|
||||
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_ios_32bit_simulator:
|
||||
platforms_archs_to_skip_test.add(
|
||||
StdlibDeploymentTarget.iOSSimulator.i386)
|
||||
if not stage_dependent_args.test_watchos_32bit_simulator:
|
||||
platforms_archs_to_skip_test.add(
|
||||
StdlibDeploymentTarget.AppleWatchSimulator.i386)
|
||||
@@ -314,8 +311,6 @@ class HostSpecificConfiguration(object):
|
||||
platforms_archs_to_skip_test.add(
|
||||
StdlibDeploymentTarget.AppleWatchSimulator.arm64)
|
||||
if host_target == StdlibDeploymentTarget.OSX.arm64.name:
|
||||
platforms_archs_to_skip_test.add(
|
||||
StdlibDeploymentTarget.iOSSimulator.i386)
|
||||
platforms_archs_to_skip_test.add(
|
||||
StdlibDeploymentTarget.iOSSimulator.x86_64)
|
||||
platforms_archs_to_skip_test.add(
|
||||
|
||||
@@ -121,15 +121,6 @@ class DarwinPlatform(Platform):
|
||||
# The names match up with the xcrun SDK names.
|
||||
xcrun_sdk_name = self.name
|
||||
|
||||
# 32-bit iOS and iOS simulator are supported, but are not covered
|
||||
# by the SDK settings. Handle this special case here.
|
||||
if (xcrun_sdk_name == 'iphoneos' and
|
||||
(arch == 'armv7' or arch == 'armv7s')):
|
||||
return True
|
||||
|
||||
if (xcrun_sdk_name == 'iphonesimulator' and arch == 'i386'):
|
||||
return True
|
||||
|
||||
sdk_path = xcrun.sdk_path(sdk=xcrun_sdk_name, toolchain=toolchain)
|
||||
if not sdk_path:
|
||||
raise RuntimeError('Cannot find SDK path for %s' % xcrun_sdk_name)
|
||||
@@ -234,15 +225,12 @@ class StdlibDeploymentTarget(object):
|
||||
OSX = DarwinPlatform("macosx", archs=["x86_64", "arm64"],
|
||||
sdk_name="OSX")
|
||||
|
||||
iOS = DarwinPlatform("iphoneos", archs=["armv7", "armv7s", "arm64", "arm64e"],
|
||||
iOS = DarwinPlatform("iphoneos", archs=["arm64", "arm64e"],
|
||||
sdk_name="IOS")
|
||||
iOSSimulator = DarwinPlatform("iphonesimulator", archs=["i386", "x86_64", "arm64"],
|
||||
iOSSimulator = DarwinPlatform("iphonesimulator", archs=["x86_64", "arm64"],
|
||||
sdk_name="IOS_SIMULATOR",
|
||||
is_simulator=True)
|
||||
|
||||
# Never build/test benchmarks on iOS armv7s.
|
||||
iOS.armv7s.supports_benchmark = False
|
||||
|
||||
AppleTV = DarwinPlatform("appletvos", archs=["arm64"],
|
||||
sdk_name="TVOS")
|
||||
AppleTVSimulator = DarwinPlatform("appletvsimulator", archs=["x86_64", "arm64"],
|
||||
|
||||
@@ -294,23 +294,6 @@ class ToolchainTestCase(unittest.TestCase):
|
||||
'build_watchos_simulator',
|
||||
'test_watchos_simulator')
|
||||
|
||||
def test_should_skip_testing_32bit_ios(self):
|
||||
host_target = 'iphonesimulator-i386'
|
||||
args = self.default_args()
|
||||
args.build_ios_simulator = True
|
||||
args.test_ios_simulator = True
|
||||
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_ios_32bit_simulator = True
|
||||
after = HostSpecificConfiguration(host_target, args)
|
||||
self.assertIn('check-swift-iphonesimulator-i386',
|
||||
after.swift_test_run_targets)
|
||||
|
||||
def test_should_skip_testing_32bit_watchos(self):
|
||||
host_target = 'watchsimulator-i386'
|
||||
args = self.default_args()
|
||||
@@ -449,10 +432,6 @@ class ToolchainTestCase(unittest.TestCase):
|
||||
generate_should_build_benchmarks(
|
||||
'macosx-x86_64',
|
||||
'build_osx')
|
||||
test_should_build_and_run_benchmarks_ios_armv7 =\
|
||||
generate_should_build_benchmarks(
|
||||
'iphoneos-armv7',
|
||||
'build_ios_device')
|
||||
test_should_build_and_run_benchmarks_ios_arm64 =\
|
||||
generate_should_build_benchmarks(
|
||||
'iphoneos-arm64',
|
||||
@@ -702,7 +681,6 @@ class ToolchainTestCase(unittest.TestCase):
|
||||
test_freebsd=False,
|
||||
test_ios_host=False,
|
||||
test_ios_simulator=False,
|
||||
test_ios_32bit_simulator=False,
|
||||
test_watchos_32bit_simulator=True,
|
||||
test_linux=False,
|
||||
test_optimize_for_size=False,
|
||||
|
||||
Reference in New Issue
Block a user