mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
compiler: use runtime.GOOS/GOARCH instead of hardcoding build tags
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/aykevl/llvm/bindings/go/llvm"
|
||||
)
|
||||
@@ -21,7 +22,7 @@ func Compile(pkgName, runtimePath, outpath, target string, printIR, dumpSSA bool
|
||||
buildTags = append(buildTags, "avr", "avr8", "atmega", "atmega328p", "js", "wasm")
|
||||
target = "avr--"
|
||||
} else {
|
||||
buildTags = append(buildTags, "linux", "amd64")
|
||||
buildTags = append(buildTags, runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
||||
c, err := NewCompiler(pkgName, target, dumpSSA)
|
||||
|
||||
Reference in New Issue
Block a user