New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 603180 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug

Blocked on:
issue 613047



Sign in to add a comment

GN: support building fat binaries for iOS

Project Member Reported by sdefresne@chromium.org, Apr 13 2016

Issue description

Currently they fail with the following error:

$ out/Default/iossim -d 'iPad Retina' out/Default/ios_web_unittests.app
2016-04-13 19:21:47.802 iossim[75417:951548] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-10174/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:260
Details:  Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping
Object:   <DVTPlugInManager: 0x7fea1470e9a0>
Method:   -extensionPointWithIdentifier:
Thread:   <NSThread: 0x7fea11505b20>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
iossim: ERROR: Simulator failed to start: "The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.)" (FBSOpenApplicationErrorDomain:1)
Supported device/SDK combinations:
  -d 'iossim - iPad Retina ' -s '9.0'
  -d 'iPhone 4s' -s '9.3'
  -d 'iPhone 5' -s '9.3'
  -d 'iPhone 5s' -s '9.3'
  -d 'iPhone 6' -s '9.3'
  -d 'iPhone 6 Plus' -s '9.3'
  -d 'iPhone 6s' -s '9.3'
  -d 'iPhone 6s Plus' -s '9.3'
  -d 'iPad 2' -s '9.3'
  -d 'iPad Retina' -s '9.3'
  -d 'iPad Air' -s '9.3'
  -d 'iPad Air 2' -s '9.3'
  -d 'iPad Pro' -s '9.3'
  -d 'Apple TV 1080p' -s '9.2'
  -d 'Apple Watch - 38mm' -s '2.2'
  -d 'Apple Watch - 42mm' -s '2.2'

 
Blocking: 459705
Labels: -Build-Tools-GN Proj-GN-Migration
I suspect this is because a default iOS build uses target_arch="x64" and hence iossim can only simulate 64-bit targets; 'iPad Retina' is 32-bit. 

It seems likely that if we try building for target_arch="x86" iPad Retina might work (though iPhone 5s won't).

To run both sets of tests on a single build we'll need to support fat binaries.
Labels: -Pri-2 Pri-3
Summary: GN: set up 32-bit iOS bots or fat binaries bots (was: GN: application should work on iPad too)
Yes, this is exactly the problem I'm hitting. I'm going to run the tests on "iPad Air" that is a 64-bit device for the moment which is I think better than not running the test on iPad.

Once we switch to only gn bots, I think we'll either need to support fat builds or to run two sets of bots, one for 32-bit and one for 64-bit (which would be my preferred solution as it will reduce the latency of the bots, since we can then do both builds in parallel).
Components: Build
Blocking: 621680
Cc: smut@chromium.org
Labels: -Pri-3 M-53 Pri-2
Labels: -M-53
not needed for M-53 ...
Blockedon: 613047
Summary: GN: support building fat binaries for iOS (was: GN: set up 32-bit iOS bots or fat binaries bots)
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b9b27be5e7007fb73ef6e0087e452227d92bbc6

commit 9b9b27be5e7007fb73ef6e0087e452227d92bbc6
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Jun 29 16:03:19 2016

Fix script and compiler invocation when using non-default toolchain.

According to "gn help root_build_dir" the variable corresponds to the
current directory when executing all compilers and scripts. So when
building the command-line for compilers or scripts, "rebase_path"
must use "root_build_dir" instead of "root_out_dir" otherwise they
will break if building for non-default toolchain.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2109133002
Cr-Commit-Position: refs/heads/master@{#402825}

[modify] https://crrev.com/9b9b27be5e7007fb73ef6e0087e452227d92bbc6/build/config/ios/rules.gni
[modify] https://crrev.com/9b9b27be5e7007fb73ef6e0087e452227d92bbc6/build/config/mac/base_rules.gni

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 30 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/308328f5f978cec9f7aabf0e76b80d2dbcf1f4de

commit 308328f5f978cec9f7aabf0e76b80d2dbcf1f4de
Author: sdefresne <sdefresne@google.com>
Date: Thu Jun 30 10:57:18 2016

Blocking: -459705 -621680
Labels: -Proj-GN-Migration Proj-GN-Migration-Ship
I'm going to try tracking ship-blocking things via the label "Proj-GN-Migration-Ship" (instead of Proj-GN-Migration) as suggested w/ a conversation w/ laforge@ and the monorail folks a while ago.

Querying for "Proj=GN-Migration%" should still return bugs for both labels, and this will allow us to filter out rollup things more easily, so that we can use blocking just for things that are truly blocking other bugs.
Labels: -Pri-2 Pri-1
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fed8056522b525d1ee49acc5a04c6b3c3c229bb

commit 3fed8056522b525d1ee49acc5a04c6b3c3c229bb
Author: sdefresne <sdefresne@chromium.org>
Date: Fri Jul 01 13:29:47 2016

Fix BundleData::GetBundleRootDirOutput() for non-default toolchain.

The "create_bundle" targets defines in build/config/{mac,ios}/rules.gni
put their outputs in "$root_out_dir". This directory is different from
the top-level output directory from BuildSettings and instead correspond
to the Settings toolchain output directory.

Fix BundleData::GetBundleRootDirOutput() to compute the bundle root
directory output relative to the toolchain output directory to fix
dependencies when a "create_bundle" target is defined in the non-default
toolchain.

Fix TestWithScope constructor to ensure that BuildSettings::SetBuildDir
call is made before the call to Settings constructor (as the toolchain
output directory is initialized from the BuildSettings build_dir).

Remove unnecessary calls to setup.build_settings().SetBuildDir() as
the value is already set in TestWithScope constructor.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2101923006
Cr-Commit-Position: refs/heads/master@{#403446}

[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/bundle_data.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/function_rebase_path_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_action_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_binary_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_bundle_data_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_copy_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_create_bundle_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/ninja_group_target_writer_unittest.cc
[modify] https://crrev.com/3fed8056522b525d1ee49acc5a04c6b3c3c229bb/tools/gn/test_with_scope.cc

Status: Started (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/511c073b382d6aafc6b5fd3301cfb287803e9701

commit 511c073b382d6aafc6b5fd3301cfb287803e9701
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Jul 06 00:24:14 2016

Stop recursion for create_bundle deps when crossing toolchain.

Only consider the bundle_data target that are defined in the same
toolchain as the create_bundle target in order to allow creation
of multi-arch build using different toolchain.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2121793003
Cr-Commit-Position: refs/heads/master@{#403832}

[modify] https://crrev.com/511c073b382d6aafc6b5fd3301cfb287803e9701/tools/gn/target.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 6 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/d008422ecff7246c80e6fc414b59d1121917290c

commit d008422ecff7246c80e6fc414b59d1121917290c
Author: sdefresne <sdefresne@google.com>
Date: Wed Jul 06 09:35:52 2016

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a9838464e81581ae9b560f9556ee50abe5176cc

commit 0a9838464e81581ae9b560f9556ee50abe5176cc
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Jul 06 16:15:37 2016

Fix in preparation of fat builds.

The "ios_bundle_data" target will need to create more intermediate
targets that will have to be in the visibility list, so use ":*"
as the visibility to restrict it to target defined in the same file.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2127733002
Cr-Commit-Position: refs/heads/master@{#403912}

[modify] https://crrev.com/0a9838464e81581ae9b560f9556ee50abe5176cc/testing/test.gni

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/60b0223fed9925519f4efb6fe865f6b9a407c999

commit 60b0223fed9925519f4efb6fe865f6b9a407c999
Author: sdefresne <sdefresne@google.com>
Date: Thu Jul 07 18:32:36 2016

Project Member

Comment 18 by bugdroid1@chromium.org, Jul 11 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/3bca58ca2551b6a230e4995297a476a25dccd483

commit 3bca58ca2551b6a230e4995297a476a25dccd483
Author: sdefresne <sdefresne@google.com>
Date: Mon Jul 11 12:41:41 2016

Project Member

Comment 19 by bugdroid1@chromium.org, Jul 12 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/0e62850f3d3e7f5665ae43f7b988ac6d5fcbc495

commit 0e62850f3d3e7f5665ae43f7b988ac6d5fcbc495
Author: sdefresne <sdefresne@google.com>
Date: Tue Jul 12 09:56:42 2016

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d

commit dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Jul 13 09:53:43 2016

Add support for multi-architecture application bundle on iOS.

Add a new variable "multi_arch_target_cpus" that can be defined by the
user via "gn args" to build for more than one architecture. It should
be set to a list of two or more architectures supported by gn build.

Add support for multi-architectures application to the "ios_app_bundle"
template. The template expands to a simple "executable" target if the
toolchain is not the default toolchain. For the default toolchain the
real executable is generated by assembling all single architecture
binaries using "lipo" tool.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2123253004
Cr-Commit-Position: refs/heads/master@{#405110}

[modify] https://crrev.com/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d/build/config/ios/ios_sdk.gni
[modify] https://crrev.com/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d/build/config/ios/rules.gni

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 13 2016

Labels: merge-merged-2795
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d

commit dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Jul 13 09:53:43 2016

Add support for multi-architecture application bundle on iOS.

Add a new variable "multi_arch_target_cpus" that can be defined by the
user via "gn args" to build for more than one architecture. It should
be set to a list of two or more architectures supported by gn build.

Add support for multi-architectures application to the "ios_app_bundle"
template. The template expands to a simple "executable" target if the
toolchain is not the default toolchain. For the default toolchain the
real executable is generated by assembling all single architecture
binaries using "lipo" tool.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2123253004
Cr-Commit-Position: refs/heads/master@{#405110}

[modify] https://crrev.com/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d/build/config/ios/ios_sdk.gni
[modify] https://crrev.com/dfc9cd81d9edc11b7cd0b0f7a5c26aff06422b9d/build/config/ios/rules.gni

Project Member

Comment 22 by bugdroid1@chromium.org, Jul 18 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/9cb2102d7874c8b0dfdd384d91a1e51c3bf7a8c0

commit 9cb2102d7874c8b0dfdd384d91a1e51c3bf7a8c0
Author: Sylvain Defresne <sdefresne@google.com>
Date: Mon Jul 18 08:36:31 2016

Project Member

Comment 23 by bugdroid1@chromium.org, Jul 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31139a2a7ffb3b502b0a963b45c391759b167154

commit 31139a2a7ffb3b502b0a963b45c391759b167154
Author: sdefresne <sdefresne@chromium.org>
Date: Mon Jul 18 09:49:56 2016

Add support for fat build to "ios_framework_bundle" target.

For a fat build, the "ios_framework_bundle" and "framework_bundle"
are a bit different for the non-default toolchain. The main target
is a shared library (instead of a bundle) and the "+link" target
depends on the "+link" target of the default toolchain (because it
is a fat binary framework so it make sense to link against that one).

The fat shared library is created using "lipo" to concatenate all
the thin shared libraries together.

BUG= 603180 

Review-Url: https://codereview.chromium.org/2135323002
Cr-Commit-Position: refs/heads/master@{#405969}

[modify] https://crrev.com/31139a2a7ffb3b502b0a963b45c391759b167154/build/config/ios/rules.gni
[modify] https://crrev.com/31139a2a7ffb3b502b0a963b45c391759b167154/build/config/mac/base_rules.gni
[modify] https://crrev.com/31139a2a7ffb3b502b0a963b45c391759b167154/components/cronet/ios/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment