all: add support for more architectures and GOOS/GOARCH (#118)

This commit does two things:

  * It adds support for the GOOS and GOARCH environment variables. They
    fall back to runtime.GO* only when not available.
  * It adds support for 3 new architectures: 386, arm, and arm64. For
    now, this is Linux-only.
This commit is contained in:
Ayke
2019-01-05 11:46:25 +01:00
committed by Ron Evans
parent f44dff6f59
commit 107fccb288
9 changed files with 125 additions and 23 deletions
+2
View File
@@ -52,6 +52,8 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
compilerConfig := compiler.Config{
Triple: spec.Triple,
CPU: spec.CPU,
GOOS: spec.GOOS,
GOARCH: spec.GOARCH,
GC: config.gc,
CFlags: spec.CFlags,
LDFlags: spec.LDFlags,