commit | e245e901b1d4f7d9282f74116f2747cbe363fc79 | [log] [tgz] |
---|---|---|
author | Nico Weber <thakis@chromium.org> | Wed Nov 24 15:23:09 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Nov 24 15:23:09 2021 |
tree | f1a6686dd6dd422008afd900cdfd9ec4542c622f | |
parent | 07c31c3f6c4c65dbe4ddd3812ef4a0242520cd56 [diff] |
Enable -Wshadow and -Wunreachable-code-aggressive under nacl/saigo The nacl saigo toolchain supports many things the old nacl toolchains don't. Similar to https://chromium-review.googlesource.com/c/chromium/src/+/3261253 Depends on: https://chromium-review.googlesource.com/c/native_client/src/native_client/+/3296267 https://chromium-review.googlesource.com/c/native_client/src/native_client/+/3296095 Bug: 1106311,794619,346399 Change-Id: I7d3c0d8fc8c42ecdd89b6c581af65726f26bec01 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3298490 Auto-Submit: Nico Weber <thakis@chromium.org> Commit-Queue: Hans Wennborg <hans@chromium.org> Reviewed-by: Hans Wennborg <hans@chromium.org> Cr-Commit-Position: refs/heads/main@{#944964}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d6b95436..db71cd5 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -1601,7 +1601,7 @@ # TODO(thakis): Enable this more often, https://crbug.com/346399 # use_libfuzzer: https://crbug.com/1063180 - if (!is_nacl && !use_libfuzzer) { + if ((!is_nacl || is_nacl_saigo) && !use_libfuzzer) { cflags += [ "-Wunreachable-code-aggressive" ] } @@ -1691,7 +1691,7 @@ config("noshadowing") { # This flag has to be disabled for nacl because the nacl compiler is too # strict about shadowing. - if (is_clang && !is_nacl) { + if (is_clang && (!is_nacl || is_nacl_saigo)) { cflags = [ "-Wshadow" ] } }