-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
go: Allow building the cross-compilers and runtime support for other platforms. #12547
Conversation
Do we really have to build e.g. plan9 cross-compilers? I'd suggest just doing either per-platform or just the common platforms (linux, windows) for now. Thanks! |
I could make it like this: Option 1:
Option 2:
|
pull? |
archs.each do |arch| | ||
cgo = opts[:cgo] ? "1" : "0" | ||
allow_fail = opts[:allow_fail] ? "|| true" : "" | ||
system "env GOROOT_FINAL=#{prefix} GOOS=#{os} GOARCH=#{arch} CGO_ENABLED=#{cgo} ./make.bash --no-clean #{allow_fail}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENV['GOROOT_FINAL'] = ...
ENV['GOOS'] = ...
...
system "./make.bash ...
This feels overly-complex. @MikeMcQuaid? |
Yes, it's pretty unreadable to me. So you need to rerun You could take the current, default |
|
I think the question is how many other people are going to use how many other cross-compilers? It's very easy to fork and install your own version of this formula so we need to find a balance between what you'll use and what others will. I'm tempted to just leave this open for a while and see if we get any other people saying "+1" in here with what cross-compilers they want. |
Related to this: I've been building the cross-compilation stuff manually using ./make.bash inside $GOROOT/src; however, I've had to disable the last step of the install (include.rmtree) (which removes the include fils both in the target and inside $GOROOT). Without that last step, building the cross-compilation toolchain works; with it, you'll have to do the build from the install (just as the pull request). In other words, I also replaced line 31, same as the pull request here. Maybe just add a caveat describing how to build the cross-compilation toolchain for a particular architecture? Personally, I need just windows-386 and linux-arm and don't care about the other targets. |
Any progress on this one? |
Needs to at least be squashed and rebased on master. |
…forms. When the `--cross-compile` option is used the following runtimes will be build: - darwin (386, amd64; with CGO) - linux (386, amd64, arm) - freebsd (386, amd64) - openbsd (386, amd64) - plan9 (386) - windows (386, amd64)
@adamv squashed and rebased. |
Since this is still open to gauge support, I'll put my 👍 here. I would need, at minimum, linux (all archs), both BSDs (all archs) and eventually windows. |
I'm happy with this as-is. If no-one has merged later I will; on a train with poor internet. |
I just tried re-installing Go with
I am yet to find where any additional logs will be to see what actually caused it to fail. I do have a few Can anybody else confirm that things install as they expect? |
Installing with Output from successful build:
|
It appears that |
When the `--cross-compile` option is used the following runtimes will be build: - darwin (386, amd64; with CGO) - linux (386, amd64, arm) - freebsd (386, amd64) - openbsd (386, amd64) - plan9 (386) - windows (386, amd64) Closes Homebrew#12547. Signed-off-by: Adam Vandenberg <[email protected]>
Building with |
When the
--cross-compile
option is used the following runtimes will be build: