From aa31116c1d7c2491245604f0564e0693f22dfd71 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 20 Jun 2019 17:47:19 -0700 Subject: 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 Tested-by: Tobias Bosch --- compiler_wrapper/gcc_flags_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler_wrapper/gcc_flags_test.go') 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) } -- cgit v1.2.3