This supports writing different .c/.s code when using gccgo.
R=golang-dev, dsymonds, iant, rsc
CC=golang-dev
https://golang.org/cl/
6823055
// $GOARCH
// cgo (if cgo is enabled)
// !cgo (if cgo is disabled)
+// ctxt.Compiler
+// !ctxt.Compiler
// tag (if tag is listed in ctxt.BuildTags)
// !tag (if tag is not listed in ctxt.BuildTags)
// a comma-separated list of any of these
if ctxt.CgoEnabled && name == "cgo" {
return true
}
- if name == ctxt.GOOS || name == ctxt.GOARCH {
+ if name == ctxt.GOOS || name == ctxt.GOARCH || name == ctxt.Compiler {
return true
}
//
// - the target operating system, as spelled by runtime.GOOS
// - the target architecture, as spelled by runtime.GOARCH
+// - the compiler being used, currently either "gc" or "gccgo"
// - "cgo", if ctxt.CgoEnabled is true
// - any additional words listed in ctxt.BuildTags
//