Skip to content

cmd/go: add 'unix' build tag but not *_unix.go file support #51572

@rsc

Description

@rsc

In #20322 we accepted a proposal to recognize unix both as a file suffix and a build tag.
@ianlancetaylor implemented it but found that there were many collisions with files named *_unix.go that would break builds.

It sounds like we should revisit this and add just the build tag, leaving unix unrecognized in file names.
This would match what we already do with tags like gc, gccgo, cgo, and so on.

So that's the proposal: add unix only as a build tag.

See #20322 (comment) and the following comments for more details.
(Opened a new issue so people don't have to read the entire conversation from before.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions