diff options
author | George Burgess IV <gbiv@google.com> | 2021-09-15 11:10:12 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-15 21:14:55 +0000 |
commit | 297b3d6fcec5871fc431408e6e6f0edc28a3306a (patch) | |
tree | 98bc1c7888056c01420bbe4ede016291ebd7f826 | |
parent | 76cc811903d123c298c248403b0d278201fddad2 (diff) | |
download | toolchain-utils-297b3d6fcec5871fc431408e6e6f0edc28a3306a.tar.gz |
compiler_wrapper: fix use-llvm-next test
The history of this test looks weird. We've had it intermittently
enabled/disabled depending on whether we're passing flags specifically
to llvm-next versions of clang. At the moment, it's failing due to a
lack of `-Wl,-z,nostart-stop-gc`, which was removed in a previous CL.
BUG=None
TEST=go test
Change-Id: I4b1ab9e5d39ba0e5575f89f51e4e83afba24a025
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3162667
Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
-rw-r--r-- | compiler_wrapper/config_test.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler_wrapper/config_test.go b/compiler_wrapper/config_test.go index 329b140c..86a78928 100644 --- a/compiler_wrapper/config_test.go +++ b/compiler_wrapper/config_test.go @@ -49,7 +49,7 @@ func TestRealConfigWithUseLLvmFlag(t *testing.T) { if err != nil { t.Fatal(err) } - if isUsingLLvmNext(cfg) { + if cfg.useLlvmNext { t.Fatal("UseLLvmNext: Expected not to be used") } @@ -59,7 +59,7 @@ func TestRealConfigWithUseLLvmFlag(t *testing.T) { t.Fatal(err) } - if !isUsingLLvmNext(cfg) { + if !cfg.useLlvmNext { t.Fatal("UseLLvmNext: Expected to be used") } @@ -126,15 +126,6 @@ func isSysrootHardened(cfg *config) bool { return false } -func isUsingLLvmNext(cfg *config) bool { - for _, arg := range cfg.clangFlags { - if arg == "-Wl,-z,nostart-stop-gc" { - return true - } - } - return false -} - func resetGlobals() { // Set all global variables to a defined state. UseLlvmNext = "unknown" |