summaryrefslogtreecommitdiff
path: root/test/inline_callers.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-11-08 10:58:58 -0500
committerRuss Cox <rsc@golang.org>2017-11-09 15:04:04 +0000
commit5993251c015dfa1e905bdf44bdb41572387edf90 (patch)
tree04948dc09879e5058c534d519cb30ba57ead515f /test/inline_callers.go
parent98f1bfbb180b30e899b27ef5c5f53d16138dbd86 (diff)
downloadgo-git-5993251c015dfa1e905bdf44bdb41572387edf90.tar.gz
cmd/go: implement per-package asmflags, gcflags, ldflags, gccgoflags
It has always been problematic that there was no way to specify tool flags that applied only to the build of certain packages; it was only to specify flags for all packages being built. The usual workaround was to install all dependencies of something, then build just that one thing with different flags. Since the dependencies appeared to be up-to-date, they were not rebuilt with the different flags. The new content-based staleness (up-to-date) checks see through this trick, because they detect changes in flags. This forces us to address the underlying problem of providing a way to specify per-package flags. The solution is to allow -gcflags=pattern=flags, which means that flags apply to packages matching pattern, in addition to the usual -gcflags=flags, which is now redefined to apply only to the packages named on the command line. See #22527 for discussion and rationale. Fixes #22527. Change-Id: I6716bed69edc324767f707b5bbf3aaa90e8e7302 Reviewed-on: https://go-review.googlesource.com/76551 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'test/inline_callers.go')
-rw-r--r--test/inline_callers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/inline_callers.go b/test/inline_callers.go
index c2be9f6eef..16012daec4 100644
--- a/test/inline_callers.go
+++ b/test/inline_callers.go
@@ -1,4 +1,4 @@
-// run -gcflags -l=4
+// run -gcflags=all=-l=4
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style