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

Issue 603762 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cfi gn config is broken for debug builds

Project Member Reported by krasin@chromium.org, Apr 14 2016

Issue description

I've generated build targets with GN with the following command line:

$ gn gen out/gn-cfi '--args=is_cfi=true is_debug=true' --check

Then I tried to build content_browsertests

$ ninja -C out/gn-cfi/ content_browsertests
...
clang: error: invalid argument '-fsanitize=cfi-unrelated-cast' only allowed with '-flto'

At the same time, the same command line, but is_debug=false works fine.

It seems that CFI + LTO is only enabled if is_debug=false. This configuration is not on the bots currently, that's why we don't catch it.

Looking into this...
 

Comment 2 by p...@google.com, Apr 14 2016

Yes, we currently only enable CFI if is_cfi=true and is_debug=false. (If this is causing you an actual problem, please convince Brett that is_cfi=true should work if is_debug=true.)

Aside from that, we should figure out why -fsanitize=cfi-unrelated-cast is appearing when is_debug=true and fix it.

Comment 3 by krasin@chromium.org, Apr 15 2016

Cc: brettw@chromium.org
After a second thought, I am fine with is_debug=true and CFI being incompatible.

But we should fail loudly during 'gn gen' run, instead of pretending it's all good and then failing (or not failing) with an obscure compile error.
Status: Assigned (was: Untriaged)

Sign in to add a comment