New issue
Advanced search Search tips

Issue 632229 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 626093



Sign in to add a comment

Hermetic build doesn't work with GN

Project Member Reported by erikc...@chromium.org, Jul 28 2016

Issue description

Justin and I did some digging last night.

1) build/config/mac/sdk_info.py needs to use the mac_toolchain, just like build/mac/find_sdk.py.

2) ios_sdk.gni attempts to look for the iphonesimulator SDK, which is not present. It's not clear to me why it's being called to begin with. Commenting out references to ios_sdk.gni, and some other ios lines in build/toolchain/mac/BUILD.gn and build/config/mac/BUILD.gn fixed the problem.

(1) is simple to fix. (2) might be, but we're not sure why mac/BUILD.gn is doing ios setup? Justin mentioned that sdefresne@ might know.
 
build/config/mac/rules.gni depends on build/config/mac/base_rules.gni that is shared with iOS. This file includes build/config/ios/ios_sdk.gni because it needs to have different behaviour on iOS.

The reason that Mac build loads part of iOS build is because when you build for iOS, you also build some tools on the host (class-dump, iossim, ...) and reload the Mac file in a separate toolchain.

When we did this we probably were not overly concerned about not having dependencies on iOS from Mac (or at least *I* may not), so we may have imported build/config/ios/ios_sdk.gni when it was not necessary. I think that gating the corresponding import behind "if (is_ios)" is the correct way to fix this.
Status: Fixed (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 30 2016

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

commit c49104d2d37cd6ad1c876ba8865b976f91a0ed98
Author: justincohen <justincohen@chromium.org>
Date: Wed Nov 30 07:43:13 2016

Correct iOS hermetic plist rule.

BUG= 632229 

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

[modify] https://crrev.com/c49104d2d37cd6ad1c876ba8865b976f91a0ed98/build/config/mac/base_rules.gni

Sign in to add a comment