compileopts: set 'purego' build tag by default

This is needed for various crypto libraries.
Этот коммит содержится в:
Ayke van Laethem 2024-02-05 18:55:10 +01:00 коммит произвёл Ron Evans
родитель ed55f56d85
коммит 0952b1b984
2 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -74,7 +74,12 @@ func (c *Config) GOARM() string {
// BuildTags returns the complete list of build tags used during this build. // BuildTags returns the complete list of build tags used during this build.
func (c *Config) BuildTags() []string { func (c *Config) BuildTags() []string {
tags := append(c.Target.BuildTags, []string{"tinygo", "math_big_pure_go", "gc." + c.GC(), "scheduler." + c.Scheduler(), "serial." + c.Serial()}...) tags := append(c.Target.BuildTags, []string{
"tinygo", // that's the compiler
"purego", // to get various crypto packages to work
"math_big_pure_go", // to get math/big to work
"gc." + c.GC(), "scheduler." + c.Scheduler(), // used inside the runtime package
"serial." + c.Serial()}...) // used inside the machine package
for i := 1; i <= c.GoMinorVersion; i++ { for i := 1; i <= c.GoMinorVersion; i++ {
tags = append(tags, fmt.Sprintf("go1.%d", i)) tags = append(tags, fmt.Sprintf("go1.%d", i))
} }

17
testdata/corpus.yaml предоставленный
Просмотреть файл

@ -24,12 +24,12 @@
- repo: github.com/buger/jsonparser - repo: github.com/buger/jsonparser
- repo: github.com/dgryski/go-bloomindex - repo: github.com/dgryski/go-bloomindex
tags: purego noasm tags: noasm
- repo: github.com/dgryski/go-arc - repo: github.com/dgryski/go-arc
- repo: github.com/dgryski/go-camellia - repo: github.com/dgryski/go-camellia
- repo: github.com/dgryski/go-change - repo: github.com/dgryski/go-change
- repo: github.com/dgryski/go-chaskey - repo: github.com/dgryski/go-chaskey
tags: appengine purego noasm tags: appengine noasm
skipwasi: true # siphash has build tag issues skipwasi: true # siphash has build tag issues
- repo: github.com/dgryski/go-clefia - repo: github.com/dgryski/go-clefia
- repo: github.com/dgryski/go-clockpro - repo: github.com/dgryski/go-clockpro
@ -40,7 +40,7 @@
- repo: github.com/dgryski/go-expirecache - repo: github.com/dgryski/go-expirecache
- repo: github.com/dgryski/go-factor - repo: github.com/dgryski/go-factor
- repo: github.com/dgryski/go-farm - repo: github.com/dgryski/go-farm
tags: purego noasm tags: noasm
- repo: github.com/dgryski/go-fuzzstr - repo: github.com/dgryski/go-fuzzstr
- repo: github.com/dgryski/go-hollow - repo: github.com/dgryski/go-hollow
- repo: github.com/dgryski/go-idea - repo: github.com/dgryski/go-idea
@ -58,13 +58,12 @@
tags: appengine # for dchest/siphash tags: appengine # for dchest/siphash
skipwasi: true skipwasi: true
- repo: github.com/dgryski/go-marvin32 - repo: github.com/dgryski/go-marvin32
tags: purego
- repo: github.com/dgryski/go-md5crypt - repo: github.com/dgryski/go-md5crypt
- repo: github.com/dgryski/go-metro - repo: github.com/dgryski/go-metro
tags: purego noasm tags: noasm
- repo: github.com/dgryski/go-misty1 - repo: github.com/dgryski/go-misty1
- repo: github.com/dgryski/go-mph - repo: github.com/dgryski/go-mph
tags: purego noasm tags: noasm
- repo: github.com/dgryski/go-mpchash - repo: github.com/dgryski/go-mpchash
tags: appengine # for dchest/siphash tags: appengine # for dchest/siphash
skipwasi: true skipwasi: true
@ -82,7 +81,7 @@
- repo: github.com/dgryski/go-s4lru - repo: github.com/dgryski/go-s4lru
- repo: github.com/dgryski/go-sequitur - repo: github.com/dgryski/go-sequitur
- repo: github.com/dgryski/go-sip13 - repo: github.com/dgryski/go-sip13
tags: purego noasm tags: noasm
- repo: github.com/dgryski/go-skinny - repo: github.com/dgryski/go-skinny
- repo: github.com/dgryski/go-skip32 - repo: github.com/dgryski/go-skip32
- repo: github.com/dgryski/go-skipjack - repo: github.com/dgryski/go-skipjack
@ -97,9 +96,9 @@
- repo: github.com/dgryski/go-xoshiro - repo: github.com/dgryski/go-xoshiro
- repo: github.com/dgryski/go-zlatlong - repo: github.com/dgryski/go-zlatlong
- repo: github.com/dgryski/go-postings - repo: github.com/dgryski/go-postings
tags: purego noasm tags: noasm
- repo: golang.org/x/crypto - repo: golang.org/x/crypto
tags: purego noasm tags: noasm
subdirs: subdirs:
- pkg: argon2 - pkg: argon2
- pkg: bcrypt - pkg: bcrypt