golang/go

build: provide a mechanism to disable architectures?

Open

#17,123 opened on Sep 15, 2016

View on GitHub
 (10 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
FeatureRequestNeedsInvestigationhelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

For build speed & binary size reasons, I would like to run make.bash with certain architectures disabled.

(my motivation: when I'm cross-compiling an ARM toolchain from Linux for #17105, there's no need for ppc64, mips64, s390x, arm64, 386, or even amd64 in my resulting binaries)

I started a prototype in https://golang.org/cl/29230 which defines build tags like "without_ppc64", "without_386", "without_s390x", etc.

The compiler and linker were easy. I decided to wait on cmd/asm until more discussion.

What do people think of something like this?

/cc @ianlancetaylor @mdempsky @randall77 @robpike @griesemer @josharian @rsc

Contributor guide