GN flag "enable_nacl" overrides "is_clang" value |
|||
Issue descriptionThat doesn't sound to be correct, as "is_clang" is defined as following: # Set to true when compiling with the Clang compiler. Typically this is used # to configure warnings. https://cs.chromium.org/chromium/src/build/config/BUILDCONFIG.gn?q=%22is_clang+%3D%22&sq=package:chromium&dr=C&l=136
,
Oct 4 2017
Variables can be re-evaluated in the context of every toolchain that we use. The NaCl toolchains are not-clang based, and so this assert is actually wrong; use_clang_coverage is true in every toolchain, but is_clang (which is toolchain-specific) is not. You probably want to change the assert to restrict it to just enable coverage for (!is_nacl), or possibly (current_toolchain == target_toolchain) || (current_toolchain == host_toolchain), depending on whether you want code coverage for the host tools.
,
Oct 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/74106e986dfbde1caf33410d77cbe1096926db94 commit 74106e986dfbde1caf33410d77cbe1096926db94 Author: Max Moroz <mmoroz@chromium.org> Date: Wed Oct 04 20:36:28 2017 Remove an assert due to corrupted "is_clang" variable + add a missing import. TBR=brettw@chromium.org,inferno@chromium.org Bug: 771718 , 759794 Change-Id: I1fc3ab8b054ce6eeee24d0c1c0599be216b2e386 Reviewed-on: https://chromium-review.googlesource.com/700974 Reviewed-by: Max Moroz <mmoroz@chromium.org> Commit-Queue: Max Moroz <mmoroz@chromium.org> Cr-Commit-Position: refs/heads/master@{#506502} [modify] https://crrev.com/74106e986dfbde1caf33410d77cbe1096926db94/build/config/compiler/BUILD.gn [modify] https://crrev.com/74106e986dfbde1caf33410d77cbe1096926db94/build/config/coverage/coverage.gni
,
Oct 4 2017
The GN definition of is_clang is correct. Nacl is compiled with clang as Dirk mentioned. The bug is that clang_coverage should not be set when compiling with nacl, not that the assert is incorrect. I left a comment on the CL about this.
,
Oct 5 2017
Thanks Dirk and Brett for the explanation!
,
Oct 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/433d48700283e612dcafe76ec8b05c837a48a920 commit 433d48700283e612dcafe76ec8b05c837a48a920 Author: Abhishek Arya <inferno@chromium.org> Date: Fri Oct 06 20:35:04 2017 Add back clang requirement assert for use_clang_coverage flag. R=brettw@chromium.org,mmoroz@chromium.org Bug: 771718 , 759794 Change-Id: I77d5f83587777d8ed4b23cf00d8f55ae48015ce0 Reviewed-on: https://chromium-review.googlesource.com/701619 Reviewed-by: Max Moroz <mmoroz@chromium.org> Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Abhishek Arya <inferno@chromium.org> Cr-Commit-Position: refs/heads/master@{#507165} [modify] https://crrev.com/433d48700283e612dcafe76ec8b05c837a48a920/build/config/coverage/coverage.gni [modify] https://crrev.com/433d48700283e612dcafe76ec8b05c837a48a920/build/toolchain/nacl_toolchain.gni |
|||
►
Sign in to add a comment |
|||
Comment 1 by mmoroz@chromium.org
, Oct 4 2017Summary: GN flag "enable_nacl" overrides "is_clang" value (was: GN flag "enable_nacl" re-defines "is_clang" value)