From 3dc68af073135f23dea37c20dbcfae2e1b9d010f Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 9 Nov 2015 17:05:09 -0800 Subject: [PATCH] Target armv7 when the dart_target_arch is forced to be arm (vs arm64) --- sky/build/Runner.xcconfig.template | 14 +++++++++++++ .../project.pbxproj | 21 ++++++++++++++----- sky/build/sky_precompilation_sdk.gni | 9 ++++++++ 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 sky/build/Runner.xcconfig.template diff --git a/sky/build/Runner.xcconfig.template b/sky/build/Runner.xcconfig.template new file mode 100644 index 00000000000..6aa8fa50f3a --- /dev/null +++ b/sky/build/Runner.xcconfig.template @@ -0,0 +1,14 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// +// Do NOT modify any of these configurations. These are specific to the runner. +// + +// This is the architecture the runner was built to target +{% if target_arch == "arm" %} +FLUTTER_TARGET_ARCH=armv7 +{% else %} +FLUTTER_TARGET_ARCH={{target_arch}} +{% endif %} diff --git a/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj b/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj index 359db21be80..b2bb9c073b5 100644 --- a/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj +++ b/sky/build/sdk_xcode_harness/FlutterApplication.xcodeproj/project.pbxproj @@ -78,6 +78,7 @@ 9E07CFED1BEAA44D00BCD8DE /* icudtl.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = icudtl.dat; sourceTree = ""; }; 9E07CFF01BEAB1BA00BCD8DE /* Snapshotter */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = Snapshotter; sourceTree = ""; }; 9E07CFF31BEAB58200BCD8DE /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Generated/app.flx; sourceTree = ""; }; + 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Runner.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -176,6 +177,7 @@ 9E07CFE21BEAA0F900BCD8DE /* PackagerInvoke */, 9E07CFF01BEAB1BA00BCD8DE /* Snapshotter */, 9E07CFE41BEAA0F900BCD8DE /* SnapshotterInvoke */, + 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */, ); path = Tools; sourceTree = ""; @@ -400,8 +402,10 @@ /* Begin XCBuildConfiguration section */ 9E07CF8C1BE7F4D200BCD8DE /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(FLUTTER_TARGET_ARCH)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -415,7 +419,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -435,11 +439,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(FLUTTER_TARGET_ARCH)"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -447,8 +451,10 @@ }; 9E07CF8D1BE7F4D200BCD8DE /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(FLUTTER_TARGET_ARCH)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -462,7 +468,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -476,11 +482,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; + VALID_ARCHS = "$(FLUTTER_TARGET_ARCH)"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -488,6 +495,7 @@ }; 9E07CF8F1BE7F4D200BCD8DE /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -506,6 +514,7 @@ }; 9E07CF901BE7F4D200BCD8DE /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -524,6 +533,7 @@ }; 9E07CFAE1BE8280A00BCD8DE /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Runner/Info.plist; @@ -536,6 +546,7 @@ }; 9E07CFAF1BE8280A00BCD8DE /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9E3326FD1BF144CB0034CBAB /* Runner.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Runner/Info.plist; diff --git a/sky/build/sky_precompilation_sdk.gni b/sky/build/sky_precompilation_sdk.gni index 806ae3b7656..3767439b2f3 100644 --- a/sky/build/sky_precompilation_sdk.gni +++ b/sky/build/sky_precompilation_sdk.gni @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//sky/engine/bindings/bindings.gni") +import("//build/config/templates/templates.gni") template("sky_precompilation_sdk") { assert(is_ios, "The precompilation SDK is only supported for iOS targets") @@ -73,6 +74,13 @@ template("sky_precompilation_sdk") { set_sources_assignment_filter(sources_assignment_filter) } + copy_config_gen_target_name = target_name + "_sdk_config" + file_template(copy_config_gen_target_name) { + input = "//sky/build/Runner.xcconfig.template" + output = "$sdk_dir/Tools/Runner.xcconfig" + variables = "target_arch=$target_cpu" + } + group(target_name) { deps = [ ":$snapshotter_copy_gen_target_name", @@ -81,6 +89,7 @@ template("sky_precompilation_sdk") { ":$copy_data_gen_target_name", ":precompilation_xcode_scripts", ":copy_sdk_xcode_harness", + ":$copy_config_gen_target_name", ] } }