-
Notifications
You must be signed in to change notification settings - Fork 20.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: improve cross compilation setup #22804
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This avoids slowing down the local builds on darwin/arm64.
This is an improved version of the cross-compiler setup code and Go binary download from build/ci.go.
This fixes a couple of issues in the ci.go script: - The cross-compiler setup is now handled by internal/build.GoToolchain. - The 'test' command now supports -dlgo, -cc, and -arch. Running unit tests with foreign GOARCH is occasionally useful. For example, it can be used to run 32-bit tests on Windows. - The 'aar', 'xcode' and 'xgo' commands now use a slightly different method to install external tools. They previously used 'go get', but this comes with the annoying side effect of modifying go.mod. We now use 'go install' instead, which is the recommended way of installing tools without modifying the local module.
Also remove note about nodejs because it is no longer needed. We used nodejs to compile the dashboard frontend, but the dashboard code was deleted a long time ago.
karalabe
approved these changes
May 4, 2021
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.
My approval is on the PR.
fjl
added a commit
that referenced
this pull request
May 4, 2021
This fixes a regression introduced in #22804.
atif-konasl
pushed a commit
to frozeman/pandora-execution-engine
that referenced
this pull request
Oct 15, 2021
This PR cleans up the CI build system and fixes a couple of issues. - The go tool launcher code has been moved to internal/build. With the new toolchain functions, the environment of the host Go (i.e. the one that built ci.go) and the target Go (i.e. the toolchain downloaded by -dlgo) are isolated more strictly. This is important to make cross compilation and -dlgo work correctly in more cases. - The -dlgo option now skips the download and uses the host Go if the running Go version matches dlgoVersion exactly. - The 'test' command now supports -dlgo, -cc and -arch. Running unit tests with foreign GOARCH is occasionally useful. For example, it can be used to run 32-bit tests on Windows. It can also be used to run darwin/amd64 tests on darwin/arm64 using Rosetta 2. - The 'aar', 'xcode' and 'xgo' commands now use a slightly different method to install external tools. They previously used `go get`, but this comes with the annoying side effect of modifying go.mod. They now use `go install` instead, which is the recommended way of installing tools without modifying the local module. - The old build warning about outdated Go version has been removed because we're much better at keeping backwards compatibility now.
atif-konasl
pushed a commit
to frozeman/pandora-execution-engine
that referenced
this pull request
Oct 15, 2021
This fixes a regression introduced in ethereum#22804.
9 tasks
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR cleans up the CI build system and fixes a couple of issues.
toolchain functions, the environment of the host Go (i.e. the one that built
ci.go) and the target Go (i.e. the toolchain downloaded by -dlgo) are isolated
more strictly. This is important to make cross compilation and -dlgo work
correctly in more cases.
version matches dlgoVersion exactly.
foreign GOARCH is occasionally useful. For example, it can be used to run
32-bit tests on Windows. It can also be used to run darwin/amd64 tests on
darwin/arm64 using Rosetta 2.
install external tools. They previously used
go get
, but this comes with theannoying side effect of modifying go.mod. They now use
go install
instead,which is the recommended way of installing tools without modifying the local
module.
much better at keeping backwards compatibility now.