diff --git a/build/common.gypi b/build/common.gypi index feff71683dd0db..a78095ea06f336 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1331,7 +1331,7 @@ # Control which version of clang to use when building for iOS. If set to # '1', uses the version of clang that ships with Xcode. If set to '0', uses # the version of clang that ships with the Chromium source. This variable - # is automatically set to '1' when using the Xcode generator. + # is automatically set to '1' in Official builds. 'clang_xcode%': 0, # These two variables can be set in GYP_DEFINES while running @@ -5352,6 +5352,9 @@ ['clang_xcode==1', { 'WARNING_CFLAGS': [ '-Wno-unknown-warning-option', + # It's not possible to achieve nullability completeness before + # all builders are running Xcode 7. crbug.com/499809 + '-Wno-nullability-completeness', ], }], diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm index 933a183c0b73b3..4d557ac8a875ac 100644 --- a/testing/iossim/iossim.mm +++ b/testing/iossim/iossim.mm @@ -632,7 +632,18 @@ - (void)session:(DTiPhoneSimulatorSession*)session // valid. DTiPhoneSimulatorSystemRoot* BuildSystemRoot(NSString* sdkVersion) { Class systemRootClass = FindClassByName(@"DTiPhoneSimulatorSystemRoot"); +#if defined(IOSSIM_USE_XCODE_6) + Class simRuntimeClass = FindClassByName(@"SimRuntime"); + NSArray* sorted = + [[simRuntimeClass supportedRuntimes] sortedArrayUsingDescriptors:@[ + [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:YES] + ]]; + NSString* versionString = [[sorted lastObject] versionString]; + DTiPhoneSimulatorSystemRoot* systemRoot = + [systemRootClass rootWithSDKVersion:versionString]; +#else DTiPhoneSimulatorSystemRoot* systemRoot = [systemRootClass defaultRoot]; +#endif if (sdkVersion) systemRoot = [systemRootClass rootWithSDKVersion:sdkVersion]; @@ -666,7 +677,7 @@ - (void)session:(DTiPhoneSimulatorSession*)session #if defined(IOSSIM_USE_XCODE_6) Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); id simDeviceType = - [simDeviceTypeClass supportedDeviceTypesByName][deviceName]; + [simDeviceTypeClass supportedDeviceTypesByAlias][deviceName]; Class simRuntimeClass = FindClassByName(@"SimRuntime"); NSString* identifier = systemRoot.runtime.identifier; id simRuntime = [simRuntimeClass supportedRuntimesByIdentifier][identifier]; @@ -956,7 +967,7 @@ int main(int argc, char* const argv[]) { if (IsRunningWithXcode6OrLater()) { #if defined(IOSSIM_USE_XCODE_6) Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); - if ([simDeviceTypeClass supportedDeviceTypesByName][deviceName] == nil) { + if ([simDeviceTypeClass supportedDeviceTypesByAlias][deviceName] == nil) { LogError(@"Invalid device name: %@.", deviceName); PrintSupportedDevices(); exit(kExitInvalidArguments);