Repository navigation
Conversation
…and windows The wrapper leaves a package alone when its compile has -shared, since the nested build of simd and its dependencies would not match its objects. But -shared is also how the go command compiles a position-independent executable, the default build mode on darwin, ios, android and windows. There every default build was left alone, so loopvec-toolexec rewrote nothing on macOS, and seven of the toolexec scripts failed there. On those targets the nested build is position-independent by default too, so -shared is accepted. Elsewhere, where -buildmode=pie must be asked for, it still leaves the package alone, as toolexec_buildmode_pie.txt checks on linux. The go command sets GOOS for the tools it runs.
thesyncim
force-pushed
the
toolexec-default-pie
branch
from
November 1, 2026 13:36
7f2af16 to
5403ba1
Compare
This file contains hidden or 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
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.
On macOS the wrapper never rewrites anything. darwin builds PIE by default, the go command passes
-sharedto every compile, and-sharedis on the unsupported list. The same goes for windows, ios and android (they're the targets whereinternal/platform.DefaultPIEis true). Seven of the eight toolexec scripts fail on macOS because of it.The concern with
-sharedis that the nested simd build wouldn't match. But when PIE is the target's default, the nested build is PIE too. So-sharedis now accepted whenGOOS, which the go command sets for its tools, is one of those four. Anywhere else, an explicit-buildmode=pieis still skipped.toolexec_buildmode_pie.txtcovers both sides: a default darwin build is rewritten and prints the same output, and-buildmode=pieon linux is skipped.toolexec_tests_simd_dependencystill fails on macOS, because it reads the parent go command from/proc. I left that alone.Without this I couldn't use the wrapper on goav1 on a Mac at all.