From 2c5d62785d59e0cd7187d66c996294e42cb94deb Mon Sep 17 00:00:00 2001 From: Ryan Beltran Date: Fri, 8 Oct 2021 18:28:28 +0000 Subject: compiler_wrapper: move llvmnext flag to post flags This CL moves flags added for LLVM Next that disabled variable_unused_but_set warnings to PostFlags in order to make sure it gets added after Wall and Wextra. BUG=b:195433889 TEST=reran package tests Change-Id: Icdd2cbe3ced7b8427257c87f9e527b0d0e8da57d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3214640 Reviewed-by: Manoj Gupta Commit-Queue: Ryan Beltran Tested-by: Ryan Beltran --- compiler_wrapper/cros_llvm_next_flags.go | 7 ++++--- .../cros_hardened_llvmnext_golden/bisect.json | 6 +++--- .../cros_hardened_llvmnext_golden/clang_path.json | 24 +++++++++++----------- .../cros_hardened_llvmnext_golden/clangtidy.json | 16 +++++++-------- .../force_disable_werror.json | 10 ++++----- .../gcc_clang_syntax.json | 8 ++++---- 6 files changed, 36 insertions(+), 35 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/cros_llvm_next_flags.go b/compiler_wrapper/cros_llvm_next_flags.go index d2ae413b..2211ae18 100644 --- a/compiler_wrapper/cros_llvm_next_flags.go +++ b/compiler_wrapper/cros_llvm_next_flags.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +//go:build !android_llvm_next_flags // +build !android_llvm_next_flags package main @@ -13,8 +14,8 @@ package main // tag is set. // TODO: Enable test in config_test.go, once we have new llvm-next flags. -var llvmNextFlags = []string{ +var llvmNextFlags = []string{} + +var llvmNextPostFlags = []string{ "-Wno-unused-but-set-variable", } - -var llvmNextPostFlags = []string{} diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json index b29f09d0..995ce860 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json @@ -40,7 +40,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -55,6 +54,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -112,7 +112,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -127,6 +126,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -187,7 +187,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -202,6 +201,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json index 352ac4da..3e396ab9 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json @@ -30,7 +30,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -45,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -93,7 +93,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -108,6 +107,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -156,7 +156,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -171,6 +170,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -219,7 +219,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -234,6 +233,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -289,7 +289,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -306,6 +305,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -364,7 +364,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -381,6 +380,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -434,7 +434,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -451,6 +450,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -499,7 +499,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -514,6 +513,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -559,7 +559,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -574,6 +573,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -619,7 +619,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -634,6 +633,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -679,7 +679,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -694,6 +693,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", @@ -742,7 +742,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -757,6 +756,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json index 11851288..0d4ee88f 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json @@ -45,7 +45,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -60,6 +59,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -86,7 +86,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -101,6 +100,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -157,7 +157,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -172,6 +171,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -199,7 +199,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -214,6 +213,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -272,7 +272,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -287,6 +286,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -317,7 +317,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -332,6 +331,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -391,7 +391,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -406,6 +405,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -433,7 +433,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -448,6 +447,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json index 44afa63d..fc55b4cd 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json @@ -33,7 +33,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -48,6 +47,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -96,7 +96,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -111,6 +110,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -145,7 +145,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -160,6 +159,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -212,7 +212,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -227,6 +226,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -261,7 +261,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -276,6 +275,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json index 2851f6d5..ede8dd00 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json @@ -30,7 +30,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -45,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -116,7 +116,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -131,6 +130,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -197,7 +197,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -212,6 +211,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -260,7 +260,6 @@ "-fexperimental-new-pass-manager", "-Wno-compound-token-split-by-macro", "-Wno-deprecated-declarations", - "-Wno-unused-but-set-variable", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-fcommon", "-fstack-protector-strong", @@ -275,6 +274,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", -- cgit v1.2.3 From afd2d4b05fac5f3a71fd78e251f04cc54cb65c57 Mon Sep 17 00:00:00 2001 From: Ryan Beltran Date: Wed, 20 Oct 2021 21:48:38 +0000 Subject: compiler_wrapper: ignore unused_but_set_variable This CL adds -Wno-unused-but-set-variable to clang post flags to prevent these warnings from blocking the LLVM uprev. BUG=b:195433889 TEST=cq Change-Id: I5195412183e2684aecd20b6ff2c3345f8b8b9dfb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3235575 Reviewed-by: Manoj Gupta Commit-Queue: Ryan Beltran Tested-by: Ryan Beltran --- compiler_wrapper/config.go | 2 ++ compiler_wrapper/cros_llvm_next_flags.go | 4 +--- compiler_wrapper/testdata/cros_hardened_golden/bisect.json | 3 +++ .../clang_ftrapv_maincc_target_specific.json | 9 +++++++++ .../cros_hardened_golden/clang_maincc_target_specific.json | 9 +++++++++ .../testdata/cros_hardened_golden/clang_path.json | 12 ++++++++++++ .../testdata/cros_hardened_golden/clang_sanitizer_args.json | 8 ++++++++ .../testdata/cros_hardened_golden/clang_specific_args.json | 4 ++++ .../cros_hardened_golden/clang_sysroot_wrapper_common.json | 6 ++++++ .../testdata/cros_hardened_golden/clangtidy.json | 8 ++++++++ .../testdata/cros_hardened_golden/force_disable_werror.json | 5 +++++ .../testdata/cros_hardened_golden/gcc_clang_syntax.json | 4 ++++ .../testdata/cros_hardened_noccache_golden/bisect.json | 3 +++ .../testdata/cros_hardened_noccache_golden/clang_path.json | 12 ++++++++++++ .../testdata/cros_hardened_noccache_golden/clangtidy.json | 8 ++++++++ .../cros_hardened_noccache_golden/force_disable_werror.json | 5 +++++ .../cros_hardened_noccache_golden/gcc_clang_syntax.json | 4 ++++ .../testdata/cros_nonhardened_golden/bisect.json | 3 +++ .../clang_ftrapv_maincc_target_specific.json | 9 +++++++++ .../clang_maincc_target_specific.json | 9 +++++++++ .../testdata/cros_nonhardened_golden/clang_path.json | 12 ++++++++++++ .../cros_nonhardened_golden/clang_sanitizer_args.json | 8 ++++++++ .../cros_nonhardened_golden/clang_specific_args.json | 4 ++++ .../clang_sysroot_wrapper_common.json | 6 ++++++ .../testdata/cros_nonhardened_golden/clangtidy.json | 8 ++++++++ .../cros_nonhardened_golden/force_disable_werror.json | 5 +++++ .../testdata/cros_nonhardened_golden/gcc_clang_syntax.json | 4 ++++ 27 files changed, 171 insertions(+), 3 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go index 11d77ba7..409456f8 100644 --- a/compiler_wrapper/config.go +++ b/compiler_wrapper/config.go @@ -154,6 +154,7 @@ var crosHardenedConfig = &config{ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", }, newWarningsDir: "/tmp/fatal_clang_warnings", triciumNitsDir: "/tmp/linting_output/clang-tidy", @@ -195,6 +196,7 @@ var crosNonHardenedConfig = &config{ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", }, newWarningsDir: "/tmp/fatal_clang_warnings", triciumNitsDir: "/tmp/linting_output/clang-tidy", diff --git a/compiler_wrapper/cros_llvm_next_flags.go b/compiler_wrapper/cros_llvm_next_flags.go index 2211ae18..870e2885 100644 --- a/compiler_wrapper/cros_llvm_next_flags.go +++ b/compiler_wrapper/cros_llvm_next_flags.go @@ -16,6 +16,4 @@ package main // TODO: Enable test in config_test.go, once we have new llvm-next flags. var llvmNextFlags = []string{} -var llvmNextPostFlags = []string{ - "-Wno-unused-but-set-variable", -} +var llvmNextPostFlags = []string{} diff --git a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json index c3bac4d2..995ce860 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json @@ -54,6 +54,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -125,6 +126,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -199,6 +201,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json index 6efe1d2a..86809109 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json @@ -46,6 +46,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -107,6 +108,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -168,6 +170,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -229,6 +232,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-linux-gnu" @@ -289,6 +293,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-eabi" @@ -349,6 +354,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-win-gnu" @@ -409,6 +415,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-linux-gnu" @@ -469,6 +476,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-eabi" @@ -529,6 +537,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-win-gnu" diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json index ac1109c1..2aae9cbb 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json @@ -44,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -103,6 +104,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -162,6 +164,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -221,6 +224,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-linux-gnu" @@ -279,6 +283,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-eabi" @@ -337,6 +342,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-win-gnu" @@ -395,6 +401,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-linux-gnu" @@ -453,6 +460,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-eabi" @@ -511,6 +519,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-win-gnu" diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json index d3dc7287..3e396ab9 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json @@ -44,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -106,6 +107,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -168,6 +170,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -230,6 +233,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -301,6 +305,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -375,6 +380,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -444,6 +450,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -506,6 +513,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -565,6 +573,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -624,6 +633,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -683,6 +693,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", @@ -745,6 +756,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json index 8ef57484..38a34c02 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json @@ -46,6 +46,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -107,6 +108,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -168,6 +170,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -229,6 +232,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -290,6 +294,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -353,6 +358,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -413,6 +419,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -474,6 +481,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json index f93c958b..1098b059 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json @@ -62,6 +62,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -123,6 +124,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -184,6 +186,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -245,6 +248,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json index 5cfe476e..6ea77a71 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json @@ -81,6 +81,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -143,6 +144,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -196,6 +198,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -255,6 +258,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -314,6 +318,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7a-cros-linux-gnueabihf" @@ -373,6 +378,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json index 658ecc26..0d4ee88f 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json @@ -59,6 +59,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -99,6 +100,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -169,6 +171,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -210,6 +213,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -282,6 +286,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -326,6 +331,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -399,6 +405,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -440,6 +447,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json index 14441d7b..fc55b4cd 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json @@ -47,6 +47,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -109,6 +110,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -157,6 +159,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -223,6 +226,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -271,6 +275,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json index 3ffd9e96..ede8dd00 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json @@ -44,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -129,6 +130,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -209,6 +211,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -271,6 +274,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json index 58a0846f..049722e1 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json @@ -53,6 +53,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -120,6 +121,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -190,6 +192,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json index 5865a12f..536797ac 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json @@ -43,6 +43,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -99,6 +100,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -155,6 +157,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -211,6 +214,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -276,6 +280,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -345,6 +350,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -413,6 +419,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -469,6 +476,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -522,6 +530,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -575,6 +584,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -628,6 +638,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", @@ -684,6 +695,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json index 658ecc26..0d4ee88f 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json @@ -59,6 +59,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -99,6 +100,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -169,6 +171,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -210,6 +213,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -282,6 +286,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -326,6 +331,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -399,6 +405,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -440,6 +447,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json index aa3de738..c49ac467 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json @@ -46,6 +46,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -102,6 +103,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -144,6 +146,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -204,6 +207,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -246,6 +250,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json index a532745f..f8bed840 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json @@ -44,6 +44,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -124,6 +125,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -204,6 +206,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -266,6 +269,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json index 7ccc0f66..cc0d88c9 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json @@ -45,6 +45,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -107,6 +108,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -172,6 +174,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json index 36e8f7d0..2a1c799e 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json @@ -37,6 +37,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -89,6 +90,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -141,6 +143,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -194,6 +197,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-linux-gnu" @@ -245,6 +249,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-eabi" @@ -297,6 +302,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-win-gnu" @@ -349,6 +355,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-linux-gnu" @@ -400,6 +407,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-eabi" @@ -452,6 +460,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-win-gnu" diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json index af33ad3a..182e692e 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json @@ -35,6 +35,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -85,6 +86,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -135,6 +137,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -186,6 +189,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-linux-gnu" @@ -235,6 +239,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-eabi" @@ -285,6 +290,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7m-cros-win-gnu" @@ -335,6 +341,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-linux-gnu" @@ -384,6 +391,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-eabi" @@ -434,6 +442,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv8m-cros-win-gnu" diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json index bb03aa25..c5ff7dae 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json @@ -35,6 +35,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -88,6 +89,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -141,6 +143,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -194,6 +197,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -256,6 +260,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -321,6 +326,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -381,6 +387,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -434,6 +441,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -484,6 +492,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -534,6 +543,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-Ba/b/c/d/e/bin", "-target", @@ -584,6 +594,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", @@ -637,6 +648,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json index 26addbcb..02b873f3 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json @@ -38,6 +38,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -91,6 +92,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -144,6 +146,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -197,6 +200,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -250,6 +254,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -305,6 +310,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -357,6 +363,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -409,6 +416,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json index 2b73d51b..bb1142c9 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json @@ -53,6 +53,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -105,6 +106,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -157,6 +159,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -209,6 +212,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json index 96d6e65a..4d69954b 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json @@ -67,6 +67,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -120,6 +121,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -166,6 +168,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -219,6 +222,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -273,6 +277,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-B../../bin", "-target", "armv7a-cros-linux-gnueabihf" @@ -323,6 +328,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json index ad6cb480..469678ab 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json @@ -50,6 +50,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -81,6 +82,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -142,6 +144,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -174,6 +177,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -237,6 +241,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -272,6 +277,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -336,6 +342,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -368,6 +375,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json index ba7f61f4..665fddbb 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json @@ -38,6 +38,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -91,6 +92,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -130,6 +132,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -187,6 +190,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -226,6 +230,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json index 5e62ca2e..af220315 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json @@ -35,6 +35,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -106,6 +107,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -172,6 +174,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", @@ -225,6 +228,7 @@ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", "-mno-movbe", "-B../../bin", "-target", -- cgit v1.2.3 From 70c83ac3df5d50f4fc4612fa2c9a5b8af4455842 Mon Sep 17 00:00:00 2001 From: Jordan R Abrahams Date: Tue, 26 Oct 2021 20:26:26 +0000 Subject: Replace non-inclusive language Wherever possible, this commit removes non-inclusive languages as per COIL policy. Some of this language exists in dead code, so this commit also removes confirmed dead code. Also some minor lint fixes to get the code past the lint checks. BUG=b:204057159 TEST=Presubmit tests Change-Id: I299bfbe5dfcbe761efc5dcb29caea2337abe3f30 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3243940 Tested-by: Jordan R Abrahams Reviewed-by: Manoj Gupta Reviewed-by: George Burgess --- compiler_wrapper/sanitizer_flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/sanitizer_flags.go b/compiler_wrapper/sanitizer_flags.go index fe8d1503..abb385a8 100644 --- a/compiler_wrapper/sanitizer_flags.go +++ b/compiler_wrapper/sanitizer_flags.go @@ -14,7 +14,7 @@ func processSanitizerFlags(builder *commandBuilder) { hasSanitizeFuzzerFlags := false for _, arg := range builder.args { // TODO: This should probably be -fsanitize= to not match on - // e.g. -fsanitize-blacklist + // e.g. -fsanitize-blocklist if arg.fromUser { if strings.HasPrefix(arg.value, "-fsanitize") { hasSanitizeFlags = true -- cgit v1.2.3 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 --- compiler_wrapper/config.go | 1 + .../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 +++++-- 10 files changed, 117 insertions(+), 57 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go index 409456f8..6c28287c 100644 --- a/compiler_wrapper/config.go +++ b/compiler_wrapper/config.go @@ -245,6 +245,7 @@ var crosHostConfig = &config{ "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", "-Wno-deprecated-copy", + "-Wno-unused-but-set-variable", }, newWarningsDir: "/tmp/fatal_clang_warnings", triciumNitsDir: "/tmp/linting_output/clang-tidy", 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 86fe58c1efd0db1d0d95b3cb0d6c34d105b39126 Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Tue, 7 Dec 2021 19:54:18 +0000 Subject: compiler_wrapper: adds ${sysroot}/usr/lib to linker path This change has been in chromiumos-overlay for a while now, but it apparently wasn't ever committed to toolchain-utils. BUG=b:209649372 TEST=This has been in prod for ages. Change-Id: Ied0b519f2f30ef275e921f41e6dbdee9c9442d03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3321723 Tested-by: Christopher Di Bella Auto-Submit: Christopher Di Bella Reviewed-by: Manoj Gupta Commit-Queue: Manoj Gupta --- compiler_wrapper/sysroot_flag.go | 13 +++++++++++++ .../testdata/cros_hardened_golden/bisect.json | 3 +++ .../clang_ftrapv_maincc_target_specific.json | 9 +++++++++ .../clang_maincc_target_specific.json | 9 +++++++++ .../testdata/cros_hardened_golden/clang_path.json | 12 ++++++++++++ .../cros_hardened_golden/clang_sanitizer_args.json | 8 ++++++++ .../cros_hardened_golden/clang_specific_args.json | 4 ++++ .../clang_sysroot_wrapper_common.json | 7 +++++++ .../testdata/cros_hardened_golden/clangtidy.json | 8 ++++++++ .../cros_hardened_golden/force_disable_werror.json | 5 +++++ .../cros_hardened_golden/gcc_clang_syntax.json | 7 +++++++ .../gcc_maincc_target_specific.json | 21 +++++++++++++++------ .../testdata/cros_hardened_golden/gcc_path.json | 6 ++++++ .../cros_hardened_golden/gcc_sanitizer_args.json | 8 ++++++++ .../cros_hardened_golden/gcc_specific_args.json | 3 +++ .../gcc_sysroot_wrapper_common.json | 9 ++++++++- .../cros_hardened_llvmnext_golden/bisect.json | 3 +++ .../cros_hardened_llvmnext_golden/clang_path.json | 12 ++++++++++++ .../cros_hardened_llvmnext_golden/clangtidy.json | 8 ++++++++ .../force_disable_werror.json | 5 +++++ .../gcc_clang_syntax.json | 7 +++++++ .../cros_hardened_llvmnext_golden/gcc_path.json | 6 ++++++ .../cros_hardened_noccache_golden/bisect.json | 3 +++ .../cros_hardened_noccache_golden/clang_path.json | 12 ++++++++++++ .../cros_hardened_noccache_golden/clangtidy.json | 8 ++++++++ .../force_disable_werror.json | 5 +++++ .../gcc_clang_syntax.json | 7 +++++++ .../cros_hardened_noccache_golden/gcc_path.json | 6 ++++++ .../testdata/cros_nonhardened_golden/bisect.json | 3 +++ .../clang_ftrapv_maincc_target_specific.json | 9 +++++++++ .../clang_maincc_target_specific.json | 9 +++++++++ .../cros_nonhardened_golden/clang_path.json | 12 ++++++++++++ .../clang_sanitizer_args.json | 8 ++++++++ .../clang_specific_args.json | 4 ++++ .../clang_sysroot_wrapper_common.json | 7 +++++++ .../testdata/cros_nonhardened_golden/clangtidy.json | 8 ++++++++ .../force_disable_werror.json | 5 +++++ .../cros_nonhardened_golden/gcc_clang_syntax.json | 7 +++++++ .../gcc_maincc_target_specific.json | 21 +++++++++++++++------ .../testdata/cros_nonhardened_golden/gcc_path.json | 6 ++++++ .../cros_nonhardened_golden/gcc_sanitizer_args.json | 8 ++++++++ .../cros_nonhardened_golden/gcc_specific_args.json | 3 +++ .../gcc_sysroot_wrapper_common.json | 9 ++++++++- 43 files changed, 319 insertions(+), 14 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/sysroot_flag.go b/compiler_wrapper/sysroot_flag.go index 501fb20e..e0583b22 100644 --- a/compiler_wrapper/sysroot_flag.go +++ b/compiler_wrapper/sysroot_flag.go @@ -11,9 +11,14 @@ import ( func processSysrootFlag(builder *commandBuilder) { fromUser := false + userSysroot := "" for _, arg := range builder.args { if arg.fromUser && strings.HasPrefix(arg.value, "--sysroot=") { fromUser = true + sysrootArg := strings.Split(arg.value, "=") + if len(sysrootArg) == 2 { + userSysroot = sysrootArg[1] + } break } } @@ -27,5 +32,13 @@ func processSysrootFlag(builder *commandBuilder) { } if !fromUser { builder.addPreUserArgs("--sysroot=" + sysroot) + } else { + sysroot = userSysroot } + + libdir := "-L" + sysroot + "/usr/lib" + if strings.Contains(builder.target.target, "64") { + libdir += "64" + } + builder.addPostUserArgs(libdir) } diff --git a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json index 995ce860..05aea31f 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json @@ -50,6 +50,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -122,6 +123,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -197,6 +199,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json index 86809109..2b04d0c9 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json @@ -42,6 +42,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -104,6 +105,7 @@ "--prefix=../../bin/x86_64-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -166,6 +168,7 @@ "--prefix=../../bin/x86_64-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -228,6 +231,7 @@ "--prefix=../../bin/armv7m-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -289,6 +293,7 @@ "--prefix=../../bin/armv7m-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -350,6 +355,7 @@ "--prefix=../../bin/armv7m-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -411,6 +417,7 @@ "--prefix=../../bin/armv8m-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -472,6 +479,7 @@ "--prefix=../../bin/armv8m-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -533,6 +541,7 @@ "--prefix=../../bin/armv8m-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json index 2aae9cbb..ea834174 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -100,6 +101,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-eabi-", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -160,6 +162,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-win-gnu-", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -220,6 +223,7 @@ "-mthumb", "--prefix=../../bin/armv7m-cros-linux-gnu-", "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -279,6 +283,7 @@ "-static-libgcc", "--prefix=../../bin/armv7m-cros-eabi-", "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -338,6 +343,7 @@ "-mthumb", "--prefix=../../bin/armv7m-cros-win-gnu-", "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -397,6 +403,7 @@ "-mthumb", "--prefix=../../bin/armv8m-cros-linux-gnu-", "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -456,6 +463,7 @@ "-static-libgcc", "--prefix=../../bin/armv8m-cros-eabi-", "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -515,6 +523,7 @@ "-mthumb", "--prefix=../../bin/armv8m-cros-win-gnu-", "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json index 3e396ab9..52d4184a 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -103,6 +104,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -166,6 +168,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -229,6 +232,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -301,6 +305,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -376,6 +381,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -446,6 +452,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -509,6 +516,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -569,6 +577,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -629,6 +638,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -689,6 +699,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -752,6 +763,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json index 38a34c02..948c19b2 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json @@ -42,6 +42,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -104,6 +105,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -166,6 +168,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -228,6 +231,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -290,6 +294,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=fuzzer", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -354,6 +359,7 @@ "-fsanitize=address", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -415,6 +421,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -477,6 +484,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json index 1098b059..d10e6cd0 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json @@ -58,6 +58,7 @@ "-Woverride-init", "-Wunsafe-loop-optimizations", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -120,6 +121,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-Wno-#warnings", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -182,6 +184,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-Wno-error=uninitialized", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -244,6 +247,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-someflag", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json index 6ea77a71..42209185 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json @@ -27,6 +27,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -77,6 +78,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -140,6 +142,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -194,6 +197,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -254,6 +258,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-D__KERNEL__", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -314,6 +319,7 @@ "--prefix=../../bin/armv7a-cros-linux-gnueabihf-", "-D__KERNEL__", "main.cc", + "-L/usr/armv7a-cros-linux-gnueabihf/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -374,6 +380,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "--sysroot=xyz", "main.cc", + "-Lxyz/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json index 0d4ee88f..ea1363e7 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json @@ -55,6 +55,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -96,6 +97,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -167,6 +169,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -209,6 +212,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -282,6 +286,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -327,6 +332,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -401,6 +407,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -443,6 +450,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json index fc55b4cd..4df81578 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json @@ -43,6 +43,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -106,6 +107,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -155,6 +157,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -222,6 +225,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -271,6 +275,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json index ede8dd00..e2037e26 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -71,6 +72,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -126,6 +128,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -157,6 +160,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -207,6 +211,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -270,6 +275,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -301,6 +307,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json index 92fec35e..0cc3d8a9 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json @@ -27,6 +27,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -65,6 +66,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -103,6 +105,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -140,7 +143,8 @@ "-D_FORTIFY_SOURCE=2", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -177,7 +181,8 @@ "-D_FORTIFY_SOURCE=2", "-fno-omit-frame-pointer", "-static-libgcc", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -214,7 +219,8 @@ "-D_FORTIFY_SOURCE=2", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -251,7 +257,8 @@ "-D_FORTIFY_SOURCE=2", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -288,7 +295,8 @@ "-D_FORTIFY_SOURCE=2", "-fno-omit-frame-pointer", "-static-libgcc", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -325,7 +333,8 @@ "-D_FORTIFY_SOURCE=2", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json index f44e69dd..5b129d7d 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json @@ -27,6 +27,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -68,6 +69,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -109,6 +111,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -147,6 +150,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -185,6 +189,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -226,6 +231,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json index 96215022..a61ead8e 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json @@ -30,6 +30,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -71,6 +72,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -112,6 +114,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -153,6 +156,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -193,6 +197,7 @@ "-static-libgcc", "-fsanitize=fuzzer", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -235,6 +240,7 @@ "-fsanitize=address", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -275,6 +281,7 @@ "-static-libgcc", "-fsanitize=address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -315,6 +322,7 @@ "-static-libgcc", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json index f5c311b4..f7b20001 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json @@ -29,6 +29,7 @@ "-static-libgcc", "-march=goldmont", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -69,6 +70,7 @@ "-static-libgcc", "-march=goldmont-plus", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -109,6 +111,7 @@ "-static-libgcc", "-march=skylake", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json index 9ca8403e..299b46b6 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json @@ -27,6 +27,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -64,6 +65,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -105,6 +107,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -138,6 +141,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -176,6 +180,7 @@ "-fno-stack-protector", "-D__KERNEL__", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -213,7 +218,8 @@ "-mthumb", "-fno-stack-protector", "-D__KERNEL__", - "main.cc" + "main.cc", + "-L/usr/armv7a-cros-linux-gnueabihf/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -252,6 +258,7 @@ "-static-libgcc", "--sysroot=xyz", "main.cc", + "-Lxyz/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json index 995ce860..05aea31f 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json @@ -50,6 +50,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -122,6 +123,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -197,6 +199,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json index 3e396ab9..52d4184a 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -103,6 +104,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -166,6 +168,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -229,6 +232,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -301,6 +305,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -376,6 +381,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -446,6 +452,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -509,6 +516,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -569,6 +577,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -629,6 +638,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -689,6 +699,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -752,6 +763,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json index 0d4ee88f..ea1363e7 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json @@ -55,6 +55,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -96,6 +97,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -167,6 +169,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -209,6 +212,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -282,6 +286,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -327,6 +332,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -401,6 +407,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -443,6 +450,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json index fc55b4cd..4df81578 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json @@ -43,6 +43,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -106,6 +107,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -155,6 +157,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -222,6 +225,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -271,6 +275,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json index ede8dd00..e2037e26 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -71,6 +72,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -126,6 +128,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -157,6 +160,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -207,6 +211,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -270,6 +275,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -301,6 +307,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_path.json index f44e69dd..5b129d7d 100644 --- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_path.json @@ -27,6 +27,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -68,6 +69,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -109,6 +111,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -147,6 +150,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -185,6 +189,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -226,6 +231,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json index 049722e1..a676dc6e 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json @@ -49,6 +49,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -117,6 +118,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -188,6 +190,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json index 536797ac..cc6d1ada 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json @@ -39,6 +39,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -96,6 +97,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -153,6 +155,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -210,6 +213,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -276,6 +280,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -346,6 +351,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -415,6 +421,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -472,6 +479,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -526,6 +534,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -580,6 +589,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -634,6 +644,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -691,6 +702,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json index 0d4ee88f..ea1363e7 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json @@ -55,6 +55,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -96,6 +97,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -167,6 +169,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -209,6 +212,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -282,6 +286,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -327,6 +332,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -401,6 +407,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -443,6 +450,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json index c49ac467..2c34edb4 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json @@ -42,6 +42,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -99,6 +100,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -142,6 +144,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -203,6 +206,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -246,6 +250,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json index f8bed840..368eb855 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json @@ -40,6 +40,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -70,6 +71,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -121,6 +123,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -152,6 +155,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -202,6 +206,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -265,6 +270,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -295,6 +301,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] }, diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json index 9a964aad..9393c4b3 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json @@ -26,6 +26,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -62,6 +63,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] }, @@ -98,6 +100,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -131,6 +134,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -164,6 +168,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -200,6 +205,7 @@ "-fno-omit-frame-pointer", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json index cc0d88c9..6c46fee8 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json @@ -41,6 +41,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -104,6 +105,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -170,6 +172,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json index 2a1c799e..86960cc9 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json @@ -33,6 +33,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -86,6 +87,7 @@ "--prefix=../../bin/x86_64-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -139,6 +141,7 @@ "--prefix=../../bin/x86_64-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -193,6 +196,7 @@ "--prefix=../../bin/armv7m-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -245,6 +249,7 @@ "--prefix=../../bin/armv7m-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -298,6 +303,7 @@ "--prefix=../../bin/armv7m-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -351,6 +357,7 @@ "--prefix=../../bin/armv8m-cros-linux-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -403,6 +410,7 @@ "--prefix=../../bin/armv8m-cros-eabi-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -456,6 +464,7 @@ "--prefix=../../bin/armv8m-cros-win-gnu-", "-ftrapv", "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json index 182e692e..69af166d 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json @@ -31,6 +31,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -82,6 +83,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-eabi-", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -133,6 +135,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-win-gnu-", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -185,6 +188,7 @@ "-mthumb", "--prefix=../../bin/armv7m-cros-linux-gnu-", "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -235,6 +239,7 @@ "-static-libgcc", "--prefix=../../bin/armv7m-cros-eabi-", "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -286,6 +291,7 @@ "-mthumb", "--prefix=../../bin/armv7m-cros-win-gnu-", "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -337,6 +343,7 @@ "-mthumb", "--prefix=../../bin/armv8m-cros-linux-gnu-", "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -387,6 +394,7 @@ "-static-libgcc", "--prefix=../../bin/armv8m-cros-eabi-", "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -438,6 +446,7 @@ "-mthumb", "--prefix=../../bin/armv8m-cros-win-gnu-", "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json index c5ff7dae..afc79511 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json @@ -31,6 +31,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -85,6 +86,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -139,6 +141,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -193,6 +196,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -256,6 +260,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -322,6 +327,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -383,6 +389,7 @@ "-resource-dir=someResourceDir", "--gcc-toolchain=/usr", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -437,6 +444,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -488,6 +496,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -539,6 +548,7 @@ "-static-libgcc", "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/stable/a/b/c/d/e/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -590,6 +600,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -644,6 +655,7 @@ "-static-libgcc", "--prefix=../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/tmp/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json index 02b873f3..f6c9f7cb 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json @@ -34,6 +34,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -88,6 +89,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -142,6 +144,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -196,6 +199,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -250,6 +254,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=fuzzer", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -306,6 +311,7 @@ "-fsanitize=address", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -359,6 +365,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -412,6 +419,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json index bb1142c9..fbe038e7 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json @@ -49,6 +49,7 @@ "-Woverride-init", "-Wunsafe-loop-optimizations", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -102,6 +103,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-Wno-#warnings", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -155,6 +157,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-Wno-error=uninitialized", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -208,6 +211,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-someflag", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json index 4d69954b..f2ccadb9 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json @@ -22,6 +22,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -63,6 +64,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -117,6 +119,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -164,6 +167,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -218,6 +222,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "-D__KERNEL__", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -273,6 +278,7 @@ "--prefix=../../bin/armv7a-cros-linux-gnueabihf-", "-D__KERNEL__", "main.cc", + "-L/usr/armv7a-cros-linux-gnueabihf/usr/lib", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -324,6 +330,7 @@ "--prefix=../../bin/x86_64-cros-linux-gnu-", "--sysroot=xyz", "main.cc", + "-Lxyz/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json index 469678ab..dc641c96 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json @@ -46,6 +46,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -78,6 +79,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -140,6 +142,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -173,6 +176,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -237,6 +241,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -273,6 +278,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -338,6 +344,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -371,6 +378,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json index 665fddbb..54b994cc 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json @@ -34,6 +34,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -88,6 +89,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -128,6 +130,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -186,6 +189,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -226,6 +230,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json index af220315..5234715d 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json @@ -31,6 +31,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -57,6 +58,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -103,6 +105,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -129,6 +132,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -170,6 +174,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -224,6 +229,7 @@ "-static-libgcc", "--prefix=../../bin/x86_64-cros-linux-gnu-", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-Wno-implicit-int-float-conversion", "-Wno-compound-token-split-by-space", "-Wno-string-concatenation", @@ -250,6 +256,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json index 5bb170bd..24f90fbf 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json @@ -22,6 +22,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -55,6 +56,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-eabi/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -88,6 +90,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-win-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -121,7 +124,8 @@ "-Wtrampolines", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-linux-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -153,7 +157,8 @@ "-Wno-deprecated-declarations", "-Wtrampolines", "-static-libgcc", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-eabi/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -186,7 +191,8 @@ "-Wtrampolines", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv7m-cros-win-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -219,7 +225,8 @@ "-Wtrampolines", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-linux-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -251,7 +258,8 @@ "-Wno-deprecated-declarations", "-Wtrampolines", "-static-libgcc", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-eabi/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -284,7 +292,8 @@ "-Wtrampolines", "-static-libgcc", "-mthumb", - "main.cc" + "main.cc", + "-L/usr/armv8m-cros-win-gnu/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_path.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_path.json index 00f2a364..b2662930 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_path.json @@ -22,6 +22,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -58,6 +59,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -94,6 +96,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -127,6 +130,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -160,6 +164,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/tmp/stable/a/b/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -196,6 +201,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json index 10ff7383..79e02c3d 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json @@ -25,6 +25,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -61,6 +62,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -97,6 +99,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -133,6 +136,7 @@ "-static-libgcc", "-fsanitize=kernel-address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -168,6 +172,7 @@ "-static-libgcc", "-fsanitize=fuzzer", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -205,6 +210,7 @@ "-fsanitize=address", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -240,6 +246,7 @@ "-static-libgcc", "-fsanitize=address", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -275,6 +282,7 @@ "-static-libgcc", "-fprofile-instr-generate", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_specific_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_specific_args.json index 5228e12b..e0fe5515 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_specific_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_specific_args.json @@ -24,6 +24,7 @@ "-static-libgcc", "-march=goldmont", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -59,6 +60,7 @@ "-static-libgcc", "-march=goldmont-plus", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -94,6 +96,7 @@ "-static-libgcc", "-march=skylake", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sysroot_wrapper_common.json index 23109bc4..ba2f292c 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sysroot_wrapper_common.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sysroot_wrapper_common.json @@ -22,6 +22,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -54,6 +55,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -90,6 +92,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ] } @@ -120,6 +123,7 @@ "-Wtrampolines", "-static-libgcc", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -156,6 +160,7 @@ "-fno-stack-protector", "-D__KERNEL__", "main.cc", + "-L/usr/x86_64-cros-linux-gnu/usr/lib64", "-mno-movbe" ], "env_updates": [ @@ -192,7 +197,8 @@ "-mthumb", "-fno-stack-protector", "-D__KERNEL__", - "main.cc" + "main.cc", + "-L/usr/armv7a-cros-linux-gnueabihf/usr/lib" ], "env_updates": [ "CCACHE_DIR=/var/cache/distfiles/ccache", @@ -226,6 +232,7 @@ "-static-libgcc", "--sysroot=xyz", "main.cc", + "-Lxyz/usr/lib64", "-mno-movbe" ], "env_updates": [ -- 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 --- compiler_wrapper/sanitizer_flags.go | 17 ------- compiler_wrapper/sanitizer_flags_test.go | 52 ---------------------- .../clang_sanitizer_args.json | 2 - .../cros_hardened_golden/clang_sanitizer_args.json | 2 - .../clang_sanitizer_args.json | 2 - 5 files changed, 75 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/sanitizer_flags.go b/compiler_wrapper/sanitizer_flags.go index abb385a8..da0a64b3 100644 --- a/compiler_wrapper/sanitizer_flags.go +++ b/compiler_wrapper/sanitizer_flags.go @@ -9,20 +9,13 @@ import ( ) func processSanitizerFlags(builder *commandBuilder) { - hasCoverageFlags := false hasSanitizeFlags := false - hasSanitizeFuzzerFlags := false for _, arg := range builder.args { // TODO: This should probably be -fsanitize= to not match on // e.g. -fsanitize-blocklist if arg.fromUser { if strings.HasPrefix(arg.value, "-fsanitize") { hasSanitizeFlags = true - if strings.Contains(arg.value, "fuzzer") { - hasSanitizeFuzzerFlags = true - } - } else if arg.value == "-fprofile-instr-generate" { - hasCoverageFlags = true } } } @@ -44,15 +37,5 @@ func processSanitizerFlags(builder *commandBuilder) { } return arg.value }) - if builder.target.compilerType == clangType { - // hasSanitizeFlags && hasCoverageFlags is to work around crbug.com/1013622 - if hasSanitizeFuzzerFlags || (hasSanitizeFlags && hasCoverageFlags) { - fuzzerFlagsToAdd := []string{ - // TODO: This flag should be removed once fuzzer works with new pass manager - "-fno-experimental-new-pass-manager", - } - builder.addPreUserArgs(fuzzerFlagsToAdd...) - } - } } } diff --git a/compiler_wrapper/sanitizer_flags_test.go b/compiler_wrapper/sanitizer_flags_test.go index 8f50a900..a401d58e 100644 --- a/compiler_wrapper/sanitizer_flags_test.go +++ b/compiler_wrapper/sanitizer_flags_test.go @@ -98,55 +98,3 @@ func TestKeepSanitizerFlagsIfSanitizeGivenInCommonFlags(t *testing.T) { } }) } - -func TestAddFuzzerFlagsForClang(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(clangX86_64, "-fsanitize=fuzzer", mainCc))) - if err := verifyArgOrder(cmd, "-fno-experimental-new-pass-manager", - "-fsanitize=fuzzer", mainCc); err != nil { - t.Error(err) - } - }) -} - -func TestOmitFuzzerFlagsForGcc(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(gccX86_64, "-fsanitize=fuzzer", mainCc))) - if err := verifyArgCount(cmd, 0, "-fno-experimental-new-pass-manager"); err != nil { - t.Error(err) - } - }) -} - -func TestAddSanitizerCoverageFlagsForClang(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(clangX86_64, "-fsanitize=address", "-fprofile-instr-generate", mainCc))) - if err := verifyArgOrder(cmd, "-fno-experimental-new-pass-manager", - "-fsanitize=address", "-fprofile-instr-generate", mainCc); err != nil { - t.Error(err) - } - }) -} - -func TestOmitSanitizerCoverageFlagsForClang(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(clangX86_64, "-fsanitize=address", mainCc))) - if err := verifyArgCount(cmd, 0, "-fno-experimental-new-pass-manager"); err != nil { - t.Error(err) - } - }) -} - -func TestKeepSanitizerCoverageFlagsForClang(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(clangX86_64, "-fprofile-instr-generate", mainCc))) - if err := verifyArgCount(cmd, 0, "-fno-experimental-new-pass-manager"); err != nil { - t.Error(err) - } - }) -} 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", diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json index 948c19b2..b71a8805 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json @@ -290,7 +290,6 @@ "-pie", "-fno-omit-frame-pointer", "-static-libgcc", - "-fno-experimental-new-pass-manager", "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=fuzzer", "main.cc", @@ -354,7 +353,6 @@ "-pie", "-fno-omit-frame-pointer", "-static-libgcc", - "-fno-experimental-new-pass-manager", "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=address", "-fprofile-instr-generate", diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json index f6c9f7cb..3e140d59 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json @@ -250,7 +250,6 @@ "-Wno-deprecated-declarations", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-static-libgcc", - "-fno-experimental-new-pass-manager", "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=fuzzer", "main.cc", @@ -306,7 +305,6 @@ "-Wno-deprecated-declarations", "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics", "-static-libgcc", - "-fno-experimental-new-pass-manager", "--prefix=../../bin/x86_64-cros-linux-gnu-", "-fsanitize=address", "-fprofile-instr-generate", -- cgit v1.2.3 From dbc8cb672a14f4a8bb136074817c71a22f743eaf Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Wed, 5 Jan 2022 14:06:42 -0800 Subject: compiler_wrapper: Use ld.bfd to detect binutils path Use ld.bfd instead of ld to detect binutils path. This is to assist in finding packages that use GCC/Binutils ignoring portage enviroment. BUG=b:193847062 TEST=go test Change-Id: I0fd8c5c13ad2227f03ec3193c58c9bdfca4e4dc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3365636 Tested-by: Manoj Gupta Auto-Submit: Manoj Gupta Reviewed-by: George Burgess Commit-Queue: George Burgess --- compiler_wrapper/clang_flags.go | 2 +- compiler_wrapper/clang_flags_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/clang_flags.go b/compiler_wrapper/clang_flags.go index 84149bf6..e25ed74c 100644 --- a/compiler_wrapper/clang_flags.go +++ b/compiler_wrapper/clang_flags.go @@ -126,7 +126,7 @@ func processClangFlags(builder *commandBuilder) error { // Specify the target for clang. if !builder.cfg.isHostWrapper { - linkerPath := getLinkerPath(env, builder.target.target+"-ld", builder.rootPath) + linkerPath := getLinkerPath(env, builder.target.target+"-ld.bfd", builder.rootPath) relLinkerPath, err := filepath.Rel(env.getwd(), linkerPath) if err != nil { return wrapErrorwithSourceLocf(err, "failed to make linker path %s relative to %s", diff --git a/compiler_wrapper/clang_flags_test.go b/compiler_wrapper/clang_flags_test.go index 25c13c74..23aed7ef 100644 --- a/compiler_wrapper/clang_flags_test.go +++ b/compiler_wrapper/clang_flags_test.go @@ -248,7 +248,7 @@ func TestClangArchFlags(t *testing.T) { func TestClangLinkerPathProbesBinariesOnPath(t *testing.T) { withTestContext(t, func(ctx *testContext) { linkerPath := filepath.Join(ctx.tempDir, "a/b/c") - ctx.writeFile(filepath.Join(linkerPath, "x86_64-cros-linux-gnu-ld"), "") + ctx.writeFile(filepath.Join(linkerPath, "x86_64-cros-linux-gnu-ld.bfd"), "") ctx.env = []string{"PATH=nonExistantPath:" + linkerPath} cmd := ctx.must(callCompiler(ctx, ctx.cfg, ctx.newCommand("./x86_64-cros-linux-gnu-clang", mainCc))) @@ -268,7 +268,7 @@ func TestClangLinkerPathEvaluatesSymlinksForBinariesOnPath(t *testing.T) { ctx.writeFile(realLinkerPath, "") firstLinkLinkerPath := filepath.Join(ctx.tempDir, "a/first/somelinker") ctx.symlink(realLinkerPath, firstLinkLinkerPath) - secondLinkLinkerPath := filepath.Join(ctx.tempDir, "a/second/x86_64-cros-linux-gnu-ld") + secondLinkLinkerPath := filepath.Join(ctx.tempDir, "a/second/x86_64-cros-linux-gnu-ld.bfd") ctx.symlink(firstLinkLinkerPath, secondLinkLinkerPath) ctx.env = []string{"PATH=nonExistantPath:" + filepath.Dir(secondLinkLinkerPath)} -- cgit v1.2.3