mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
compiler: use runtime.GOOS/GOARCH instead of hardcoding build tags
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"github.com/aykevl/llvm/bindings/go/llvm"
|
"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")
|
buildTags = append(buildTags, "avr", "avr8", "atmega", "atmega328p", "js", "wasm")
|
||||||
target = "avr--"
|
target = "avr--"
|
||||||
} else {
|
} else {
|
||||||
buildTags = append(buildTags, "linux", "amd64")
|
buildTags = append(buildTags, runtime.GOOS, runtime.GOARCH)
|
||||||
}
|
}
|
||||||
|
|
||||||
c, err := NewCompiler(pkgName, target, dumpSSA)
|
c, err := NewCompiler(pkgName, target, dumpSSA)
|
||||||
|
|||||||
Reference in New Issue
Block a user