mirror of
https://github.com/golang/go
synced 2024-11-07 15:36:23 -07:00
cmd/go: document import "C" check from CL 129062
Added this locally but then broke the first rule of Gerrit and clicked Submit instead of running "git submit". Change-Id: I83c28d9151c566e9b2092e2613d67731a5d64beb Reviewed-on: https://go-review.googlesource.com/129678 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
974d5364a6
commit
751ea9369a
@ -49,12 +49,19 @@ Files:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, fmt.Errorf("reading %s: %v", name, err)
|
return nil, nil, fmt.Errorf("reading %s: %v", name, err)
|
||||||
}
|
}
|
||||||
// import "C" is implicit requirement of cgo tag
|
|
||||||
|
// import "C" is implicit requirement of cgo tag.
|
||||||
|
// When listing files on the command line (explicitFiles=true)
|
||||||
|
// we do not apply build tag filtering but we still do apply
|
||||||
|
// cgo filtering, so no explicitFiles check here.
|
||||||
|
// Why? Because we always have, and it's not worth breaking
|
||||||
|
// that behavior now.
|
||||||
for _, path := range list {
|
for _, path := range list {
|
||||||
if path == `"C"` && !tags["cgo"] && !tags["*"] {
|
if path == `"C"` && !tags["cgo"] && !tags["*"] {
|
||||||
continue Files
|
continue Files
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !explicitFiles && !ShouldBuild(data, tags) {
|
if !explicitFiles && !ShouldBuild(data, tags) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user