diff options
author | Tobias Bosch <tbosch@google.com> | 2019-06-20 17:47:19 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-06-25 14:47:26 +0000 |
commit | aa31116c1d7c2491245604f0564e0693f22dfd71 (patch) | |
tree | 4fd8fb92a9a459bb718f8d0c943a05632defbd08 /compiler_wrapper/gcc_flags_test.go | |
parent | b9992bba3b4e752f10410c624a500762d090fa2b (diff) | |
download | toolchain-utils-aa31116c1d7c2491245604f0564e0693f22dfd71.tar.gz |
Allow to pass in the use_ccache via go build.
Removes usage of go build tags in favor of passing in
configuration via -ldflags -X ...
BUG=chromium:773875
TEST=unit test
Change-Id: I4e8a58e1679b2858e9d4620d6b9c7a35ad08a6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1670987
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/gcc_flags_test.go')
-rw-r--r-- | compiler_wrapper/gcc_flags_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler_wrapper/gcc_flags_test.go b/compiler_wrapper/gcc_flags_test.go index 12119f0b..9e34216d 100644 --- a/compiler_wrapper/gcc_flags_test.go +++ b/compiler_wrapper/gcc_flags_test.go @@ -6,9 +6,9 @@ import ( func TestCallRealGcc(t *testing.T) { withTestContext(t, func(ctx *testContext) { - wrapperCmd := ctx.newCommand(gccX86_64, "-noccache", mainCc) - cmd := ctx.must(calcCompilerCommandAndCompareToOld(ctx, ctx.cfg, wrapperCmd)) - if err := verifyPath(cmd, wrapperCmd.path+".real"); err != nil { + cmd := ctx.must(calcCompilerCommandAndCompareToOld(ctx, ctx.cfg, + ctx.newCommand(gccX86_64, mainCc))) + if err := verifyPath(cmd, gccX86_64+".real"); err != nil { t.Error(err) } }) @@ -16,8 +16,8 @@ func TestCallRealGcc(t *testing.T) { func TestCallRealGPlusPlus(t *testing.T) { withTestContext(t, func(ctx *testContext) { - wrapperCmd := ctx.newCommand("./x86_64-cros-linux-gnu-g++", "-noccache", mainCc) - cmd := ctx.must(calcCompilerCommandAndCompareToOld(ctx, ctx.cfg, wrapperCmd)) + cmd := ctx.must(calcCompilerCommandAndCompareToOld(ctx, ctx.cfg, + ctx.newCommand("./x86_64-cros-linux-gnu-g++", mainCc))) if err := verifyPath(cmd, "\\./x86_64-cros-linux-gnu-g\\+\\+\\.real"); err != nil { t.Error(err) } |