New issue
Advanced search Search tips

Issue 632279 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

GN: ChromeOS: Wrong compiler used while building with clang

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

Issue description

We are working on the migration to Clang for ChromeOS.
Since GN was made the default we are getting an error in the clang build which I traced to a TODO in the following file.

https://cs.chromium.org/chromium/src/native_client/src/trusted/service_runtime/linux/BUILD.gn?sq=package:chromium

dpranke proposed I tried the following which seemed to work. Please provide a CL for this.

diff --git a/src/trusted/service_runtime/linux/BUILD.gn b/src/trusted/service_runtime/linux/BUILD.gn
index ce2923b..a7067c9 100644
--- a/src/trusted/service_runtime/linux/BUILD.gn
+++ b/src/trusted/service_runtime/linux/BUILD.gn
@@ -18,7 +18,8 @@
 # TODO(dpranke): There needs to be a better way to determine if
 # we are using the custom CrOS toolchains, but for now we check is_clang,
 # which is the same way we check in //build/config/BUILDCONFIG.gn.
-_is_cros_target_toolchain = is_chromeos && !is_clang
+#_is_cros_target_toolchain = is_chromeos && !is_clang
+_is_cros_target_toolchain = (custom_toolchain == "//build/toolchain/cros:target")
 if (target_os == "chromeos") {
   import("//build/toolchain/cros_toolchain.gni")
 }

 
Project Member

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

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

commit d5b49c1cf6737a33c918e8433c12e19538223f6e
Author: dpranke <dpranke@chromium.org>
Date: Wed Aug 03 23:08:27 2016

Clean up default toolchain logic for CrOS GN builds.

The initial versions of the CrOS GN builds were written when we
didn't really understand how the different CrOS builds would work,
and we weren't sure what the toolchains needed to look like.

We can now safely say that the //build/toolchain/cros:* toolchains
should only be used in the simplechrome and ebuild workflows, where
`custom_toolchain="//build/toolchain/cros:target"` in the GN args.
For "regular" desktop ChromeOS builds, we should just re-use the
linux toolchains.

R=brettw@chromium.org, llozano@chromium.org
BUG= 632279 

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

[modify] https://crrev.com/d5b49c1cf6737a33c918e8433c12e19538223f6e/build/config/BUILDCONFIG.gn
[modify] https://crrev.com/d5b49c1cf6737a33c918e8433c12e19538223f6e/build/toolchain/cros/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 12 2016

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

commit 7f24256b210c705280eba663592e10adf94fd3d3
Author: nacl-deps-roller <nacl-deps-roller@chromium.org>
Date: Fri Aug 12 20:37:30 2016

Roll src/native_client/ f572c0076..17d37b19f (1 commit).

https://chromium.googlesource.com/native_client/src/native_client.git/+log/f572c0076316..17d37b19f25e

$ git log f572c0076..17d37b19f --date=short --no-merges --format='%ad %ae %s'
2016-08-12 dpranke Rework checks for the CrOS toolchains for nacl_bootstrap toolchain.

BUG= 632279 

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_dbg_32_ng,linux_nacl_sdk_build
TBR=mseaborn@chromium.org

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

[modify] https://crrev.com/7f24256b210c705280eba663592e10adf94fd3d3/DEPS

Status: Fixed (was: Assigned)
Is this fixed now? I think it is ... if it isn't, I've forgotten what else we need to do :).
Status: verified (was: Fixed)
Cc: llozano@chromium.org
 Issue 628382  has been merged into this issue.

Sign in to add a comment