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

Issue 633978 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

GN assignment has no effect / variable unused before it went out of scope

Project Member Reported by olivierrobin@chromium.org, Aug 3 2016

Issue description

When building for iOS,
if I set use_xcode_clang to true (which is done by setting is_official_build to true), I get an error when running gn gen

gn gen out/gn-Release-iphoneos/
ERROR at //build/toolchain/mac/BUILD.gn:30:21: Assignment had no effect.
  compiler_prefix = ""
                    ^-
You set the variable "compiler_prefix" here and it was unused before it went
out of scope.
See //BUILD.gn:65:1: which caused the file to be included.
group("gn_all") {
^----------------


It seems that the variable is used at //build/toolchain/mac/BUILD.gn:89 so I don't understand this error.

This block releasing officials for iOS now that gyp is deprecated.
 
Labels: -Build-Tools-GN Proj-GN-Migration
Yup, I hit this when I was working on setting up a public xcode_clang builder as well. If sdefresne@ doesn't get to this today, I'll take a look.
I have a CL pending review.
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 3 2016

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

commit ecc33473f3dbebda070e0ceedb9316591414949f
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Aug 03 18:15:40 2016

Fix compilation with Xcode version of clang.

Fix unused variable error in //build/toolchain/mac/BUILD.gn by
moving the _compiler_prefix variable inside the mac_toolchain
template.

Only check the use_clang_xcode variable for the default toolchain
as some file are build with "mac" current_os on iOS.

BUG= 633978 

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

[modify] https://crrev.com/ecc33473f3dbebda070e0ceedb9316591414949f/build/toolchain/mac/BUILD.gn
[modify] https://crrev.com/ecc33473f3dbebda070e0ceedb9316591414949f/build/toolchain/toolchain.gni

Status: Fixed (was: Assigned)

Sign in to add a comment