From 3ac3238f1f3a15b413adf72b98f0f99eea115e0a Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 3 May 2019 16:03:02 -0500 Subject: [PATCH 1/5] src,ios: Fix iPhone SDK detection --- gyp/XCodeDetect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gyp/XCodeDetect.py b/gyp/XCodeDetect.py index cc7b8fac..10df40d4 100644 --- a/gyp/XCodeDetect.py +++ b/gyp/XCodeDetect.py @@ -58,8 +58,8 @@ def HasIPhoneSDK(): if 'HasIPhoneSDK' not in XCodeDetect._cache: try: - out = run('xcrun', '--sdk', 'iphoneos', '--show-sdk-path') + run('xcrun', '--sdk', 'iphoneos', '--show-sdk-path') + XCodeDetect._cache['HasIPhoneSDK'] = True except subprocess.CalledProcessError: - out = 1 - XCodeDetect._cache['HasIPhoneSDK'] = out == 0 + XCodeDetect._cache['HasIPhoneSDK'] = False return XCodeDetect._cache['HasIPhoneSDK'] From 7d89444a124c1325f43fa4d8c02291e6a424a314 Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 3 May 2019 20:18:09 -0500 Subject: [PATCH 2/5] src,ios: fix ninja format for iphoneos In some circumstances, ninja was building with iPhoneSimulator rather than iPhoneOS even though SDKROOT was set to iphoneos. --- gyp/xcode_emulation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gyp/xcode_emulation.py b/gyp/xcode_emulation.py index 9864393d..327d37db 100644 --- a/gyp/xcode_emulation.py +++ b/gyp/xcode_emulation.py @@ -1779,6 +1779,7 @@ def _AddIOSDeviceConfigurations(targets): configs = target_dict['configurations'] for config_name, simulator_config_dict in dict(configs).items(): + simulator_config_dict = copy.deepcopy(simulator_config_dict) iphoneos_config_dict = copy.deepcopy(simulator_config_dict) configs[config_name + '-iphoneos'] = iphoneos_config_dict configs[config_name + '-iphonesimulator'] = simulator_config_dict From d5e4376b2f38834d4473be9e091da59131dd604b Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 3 May 2019 20:35:18 -0500 Subject: [PATCH 3/5] test,ios: make iphonesimulator cases more explicit --- test/ios/gyptest-archs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ios/gyptest-archs.py b/test/ios/gyptest-archs.py index 8c2f86a8..a0d019e7 100644 --- a/test/ios/gyptest-archs.py +++ b/test/ios/gyptest-archs.py @@ -20,19 +20,19 @@ test.skip_test() # bug=532 test_cases = [ - ('Default', 'TestArch32Bits', ['i386']), + ('Default-iphonesimulator', 'TestArch32Bits', ['i386']), ('Default-iphoneos', 'TestArch32Bits', ['armv7']), ] if XCodeDetect.XCodeDetect.Version() < '0510': test_cases.extend([ - ('Default', 'TestNoArchs', ['i386']), + ('Default-iphonesimulator', 'TestNoArchs', ['i386']), ('Default-iphoneos', 'TestNoArchs', ['armv7'])]) if XCodeDetect.XCodeDetect.Version() >= '0500': test_cases.extend([ - ('Default', 'TestArch64Bits', ['x86_64']), - ('Default', 'TestMultiArchs', ['i386', 'x86_64']), + ('Default-iphonesimulator', 'TestArch64Bits', ['x86_64']), + ('Default-iphonesimulator', 'TestMultiArchs', ['i386', 'x86_64']), ('Default-iphoneos', 'TestArch64Bits', ['arm64']), ('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64'])]) From d863af12646cb8bd36c11b8f148a167351d85b3e Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 3 May 2019 20:40:36 -0500 Subject: [PATCH 4/5] test,ios: fix IB document compilation error Upgrade test/ios/app-bundle/test.gyp to IPHONEOS_DEPLOYMENT_TARGET 7.0 to fix the following error: "Compiling IB documents for earlier than iOS 7 is no longer supported." --- test/ios/app-bundle/test.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ios/app-bundle/test.gyp b/test/ios/app-bundle/test.gyp index 1b2bb0cc..396d73b1 100644 --- a/test/ios/app-bundle/test.gyp +++ b/test/ios/app-bundle/test.gyp @@ -67,7 +67,7 @@ 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', 'INFOPLIST_OUTPUT_FORMAT':'xml', 'SDKROOT': 'iphonesimulator', # -isysroot - 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', 'CONFIGURATION_BUILD_DIR':'build/Default', }, }, From 9cdc184f4b0bcda1284e2b2d22bc0b581a2230e5 Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 3 May 2019 21:18:36 -0500 Subject: [PATCH 5/5] test,ios: update ios deployment targets --- .../deployment-target/deployment-target.gyp | 152 ++++++++++++++++-- 1 file changed, 139 insertions(+), 13 deletions(-) diff --git a/test/ios/deployment-target/deployment-target.gyp b/test/ios/deployment-target/deployment-target.gyp index bdc1439b..c652b7d1 100644 --- a/test/ios/deployment-target/deployment-target.gyp +++ b/test/ios/deployment-target/deployment-target.gyp @@ -2,33 +2,159 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { - 'make_global_settings': [ - ['CC', '/usr/bin/clang'], - ['CXX', '/usr/bin/clang++'], - ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++14', + 'CLANG_CXX_LIBRARY': 'libc++', + 'ALWAYS_SEARCH_USER_PATHS': 'NO', + 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks + 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic + # (Equivalent to -fPIC) + 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions + 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti + 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings + 'PREBINDING': 'NO', # No -Wl,-prebind + 'USE_HEADERMAP': 'NO', + 'OTHER_CFLAGS': [ + '-fembed-bitcode', + '-fno-strict-aliasing', + ], + 'WARNING_CFLAGS': [ + '-Wall', + '-Wendif-labels', + '-W', + '-Wno-unused-parameter', + ], + }, 'targets': [ { - 'target_name': 'version-min-4.3', + 'target_name': 'iphoneos-version-min-8.0', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_8_0', ], + 'xcode_settings': { + 'ARCHS': ['arm64'], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], + }, + { + 'target_name': 'libiphoneos-version-min-8.0', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_8_0', ], + 'xcode_settings': { + 'ARCHS': ['arm64'], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], + }, + { + 'target_name': 'libiphonesimulator-version-min-8.0', 'type': 'static_library', 'sources': [ 'check-version-min.c', ], - 'defines': [ 'GYPTEST_IOS_VERSION_MIN=40300', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_8_0', ], 'xcode_settings': { - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': ['x86_64'], + 'SDKROOT': 'iphonesimulator', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], + }, + { + 'target_name': 'iphoneos-version-min-12.0', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_12_0', ], + 'xcode_settings': { + 'ARCHS': ['arm64'], 'SDKROOT': 'iphoneos', - 'IPHONEOS_DEPLOYMENT_TARGET': '4.3', + 'IPHONEOS_DEPLOYMENT_TARGET': '12.0', }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], }, { - 'target_name': 'version-min-5.0', + 'target_name': 'libiphoneos-version-min-12.0', 'type': 'static_library', 'sources': [ 'check-version-min.c', ], - 'defines': [ 'GYPTEST_IOS_VERSION_MIN=50000', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_12_0', ], 'xcode_settings': { - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': ['arm64'], 'SDKROOT': 'iphoneos', - 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'IPHONEOS_DEPLOYMENT_TARGET': '12.0', }, - } + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], + }, + { + 'target_name': 'libiphonesimulator-version-min-12.0', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=__IPHONE_12_0', ], + 'xcode_settings': { + 'ARCHS': ['x86_64'], + 'SDKROOT': 'iphonesimulator', + 'IPHONEOS_DEPLOYMENT_TARGET': '12.0', + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-search_paths_first', + '-fembed-bitcode', + ], + }, + }], + ], + }, ], }