cfi gn config is broken for debug builds |
|||
Issue descriptionI'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...
,
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.
,
Apr 15 2016
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.
,
Aug 1
|
|||
►
Sign in to add a comment |
|||
Comment 1 by krasin@chromium.org
, Apr 14 2016