From d02a62da66a5ca7d7d849aca8289ca783a68a7c8 Mon Sep 17 00:00:00 2001 From: Ryan Beltran Date: Mon, 6 Dec 2021 23:06:12 +0000 Subject: compiler_wrapper: add missing unused-but-set-var This CL adds a Wno-unused-but-set-var flag that was accidentally missing in a clangPostFlags field. THis is already present in the llvm repo, must have been fixed in there without mirroring it. BUG=b:195433889 TEST=None Change-Id: I23fcc91aee7b316cd70652f0119177d5ebdf7bbd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3319338 Reviewed-by: Manoj Gupta Commit-Queue: Ryan Beltran Tested-by: Ryan Beltran --- .../testdata/cros_clang_host_golden/bisect.json | 9 ++++-- .../clang_ftrapv_maincc_target_specific.json | 27 ++++++++++------ .../cros_clang_host_golden/clang_host_wrapper.json | 3 +- .../clang_maincc_target_specific.json | 27 ++++++++++------ .../cros_clang_host_golden/clang_path.json | 36 ++++++++++++++-------- .../clang_sanitizer_args.json | 24 ++++++++++----- .../clang_specific_args.json | 12 +++++--- .../testdata/cros_clang_host_golden/clangtidy.json | 24 ++++++++++----- .../force_disable_werror.json | 11 +++++-- 9 files changed, 116 insertions(+), 57 deletions(-) (limited to 'compiler_wrapper/testdata/cros_clang_host_golden') diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json b/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json index fae0f9f5..e237c7c7 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json @@ -43,7 +43,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ], "env_updates": [ "PYTHONPATH=/somepath/test_binary" @@ -97,7 +98,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ], "env_updates": [ "PYTHONPATH=/somepath/test_binary" @@ -154,7 +156,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ], "env_updates": [ "PYTHONPATH=/somepath/test_binary" diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json index 947f1a4d..07fccc6d 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json @@ -34,7 +34,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -75,7 +76,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -116,7 +118,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -157,7 +160,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -198,7 +202,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -239,7 +244,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -280,7 +286,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -321,7 +328,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -362,7 +370,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json index 9267f5b4..a221605e 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json @@ -33,7 +33,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json index c7a4a6a7..2130d528 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json @@ -33,7 +33,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -73,7 +74,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -113,7 +115,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -153,7 +156,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -193,7 +197,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -233,7 +238,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -273,7 +279,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -313,7 +320,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -353,7 +361,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json index 96b3fe50..43ae728a 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json @@ -33,7 +33,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -76,7 +77,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stdout": "somemessage", @@ -119,7 +121,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -162,7 +165,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -214,7 +218,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -269,7 +274,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -324,7 +330,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stdout": "somemessage", @@ -367,7 +374,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -407,7 +415,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -447,7 +456,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -487,7 +497,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -530,7 +541,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json index 14e45b27..cc64bad9 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json @@ -36,7 +36,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -79,7 +80,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -122,7 +124,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -165,7 +168,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -208,7 +212,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -253,7 +258,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -295,7 +301,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -337,7 +344,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json index 01a50a96..7c4afd32 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json @@ -51,7 +51,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -93,7 +94,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -135,7 +137,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -177,7 +180,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json b/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json index 2a563b89..f678ba64 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json @@ -49,7 +49,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } }, @@ -76,7 +77,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -133,7 +135,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } }, @@ -160,7 +163,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -219,7 +223,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stdout": "somemessage", @@ -249,7 +254,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -309,7 +315,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } }, @@ -336,7 +343,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stdout": "somemessage", diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json index 139e351a..f5a77714 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json @@ -36,7 +36,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] } } @@ -79,7 +80,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stderr": "-Werror originalerror", @@ -109,6 +111,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-Wno-error", "-Wno-error=poison-system-directories" ] @@ -155,7 +158,8 @@ "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", - "-Wno-deprecated-copy" + "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable" ] }, "stderr": "-Werror originalerror", @@ -185,6 +189,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-Wno-error", "-Wno-error=poison-system-directories" ] -- cgit v1.2.3 From ed2aa295b315c2d2570e942e6a056c45028f39b4 Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Mon, 6 Dec 2021 11:46:42 -0800 Subject: compiler_wrapper: Drop "-fno-experimental-pass-manager" new pass manager is already default in upstream llvm and fixes have been made to broken features. So stop using the old pass manager with sanitizers. BUG=b:210661138 TEST=CQ Change-Id: Ia73f6c89a095a5cac4d8d175afd6ff18edd200a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3319340 Reviewed-by: Ryan Beltran Reviewed-by: Christopher Di Bella Commit-Queue: Manoj Gupta Tested-by: Manoj Gupta --- .../testdata/cros_clang_host_golden/clang_sanitizer_args.json | 2 -- 1 file changed, 2 deletions(-) (limited to 'compiler_wrapper/testdata/cros_clang_host_golden') diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json index cc64bad9..b8b28cd9 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json @@ -206,7 +206,6 @@ "-Wno-deprecated-declarations", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", - "-fno-experimental-new-pass-manager", "-fsanitize=fuzzer", "main.cc", "-Wno-implicit-int-float-conversion", @@ -251,7 +250,6 @@ "-Wno-deprecated-declarations", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", - "-fno-experimental-new-pass-manager", "-fsanitize=address", "-fprofile-instr-generate", "main.cc", -- cgit v1.2.3