Fix the build constraints on the assembly files - #4
Open
asp24 wants to merge 1 commit into
Open
Conversation
`//+build !noasm !appengine gc` is an OR - the file is built if any one term holds - so
it held on essentially every build, and all nine .s files were compiled even under
-tags=noasm. `go list -tags=noasm -f '{{.SFiles}}'` lists all nine today and none after
this change.
The tag did take effect, because the Go declarations beside the assembly use the AND
form and so were excluded; the assembly was compiled and left unreferenced. So nothing
was broken by it, but -tags=noasm still needed an assembler, and the constraint said
something other than what it meant.
Only the //go:build form is written: go.mod asks for 1.22, well past the release that
understands it, and keeping a single line means the two cannot drift apart again.
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.
Candidate for
minio/simdjson-go. Cut from upstream master; based here on #2 only so that CI is green.//+build !noasm !appengine gcis an OR, so it holds on essentially every build and all nine.sfiles are compiled even under-tags=noasm. Before:After, that list is empty, and the normal build still has all nine.
The tag did take effect, because the Go declarations beside the assembly use the AND form and were excluded, leaving the assembly compiled and unreferenced - so nothing was broken, but
-tags=noasmstill needed an assembler and the constraint said something other than what it meant. Only the//go:buildform is written:go.modasks for 1.22, well past the release that understands it, and one line cannot drift out of step with a second.