From 21db7e60995bc7e894bc19a93e143c3f26eb9569 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 17 Nov 2018 14:36:41 +0100 Subject: [PATCH] main: move "tinygo" build tag to compiler Replace "tgo" with "tinygo" and set it always (even with `tinygo run`). --- compiler/compiler.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/compiler.go b/compiler/compiler.go index 74d0983d..8c47dda8 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -200,7 +200,7 @@ func (c *Compiler) Compile(mainPath string) error { CgoEnabled: true, UseAllFiles: false, Compiler: "gc", // must be one of the recognized compilers - BuildTags: append([]string{"tgo"}, c.BuildTags...), + BuildTags: append([]string{"tinygo"}, c.BuildTags...), }, ParserMode: parser.ParseComments, } diff --git a/main.go b/main.go index e4b0e965..eba4720b 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act DumpSSA: config.dumpSSA, RootDir: sourceDir(), GOPATH: getGopath(), - BuildTags: append(spec.BuildTags, "tinygo"), + BuildTags: spec.BuildTags, InitInterp: config.initInterp, } c, err := compiler.NewCompiler(pkgName, compilerConfig)