diff options
author | Ayke van Laethem <[email protected]> | 2024-02-05 18:55:10 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-02-11 10:43:28 +0100 |
commit | 0952b1b98440eca0a9b5c1a1b136f9bee28096d5 (patch) | |
tree | a002375807f932b0b3ca73f79b780742f9f1af0a /compileopts/config.go | |
parent | ed55f56d8500c3bb9cb6b344d18e2b114c20a531 (diff) | |
download | tinygo-0952b1b98440eca0a9b5c1a1b136f9bee28096d5.tar.gz tinygo-0952b1b98440eca0a9b5c1a1b136f9bee28096d5.zip |
compileopts: set 'purego' build tag by default
This is needed for various crypto libraries.
Diffstat (limited to 'compileopts/config.go')
-rw-r--r-- | compileopts/config.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compileopts/config.go b/compileopts/config.go index e1689d3ba..d5e037042 100644 --- a/compileopts/config.go +++ b/compileopts/config.go @@ -74,7 +74,12 @@ func (c *Config) GOARM() string { // BuildTags returns the complete list of build tags used during this build. 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++ { tags = append(tags, fmt.Sprintf("go1.%d", i)) } |