main: move "tinygo" build tag to compiler

Replace "tgo" with "tinygo" and set it always (even with `tinygo run`).
This commit is contained in:
Ayke van Laethem
2018-11-17 14:36:41 +01:00
parent 15a4afb22a
commit 21db7e6099
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ func (c *Compiler) Compile(mainPath string) error {
CgoEnabled: true, CgoEnabled: true,
UseAllFiles: false, UseAllFiles: false,
Compiler: "gc", // must be one of the recognized compilers Compiler: "gc", // must be one of the recognized compilers
BuildTags: append([]string{"tgo"}, c.BuildTags...), BuildTags: append([]string{"tinygo"}, c.BuildTags...),
}, },
ParserMode: parser.ParseComments, ParserMode: parser.ParseComments,
} }
+1 -1
View File
@@ -40,7 +40,7 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
DumpSSA: config.dumpSSA, DumpSSA: config.dumpSSA,
RootDir: sourceDir(), RootDir: sourceDir(),
GOPATH: getGopath(), GOPATH: getGopath(),
BuildTags: append(spec.BuildTags, "tinygo"), BuildTags: spec.BuildTags,
InitInterp: config.initInterp, InitInterp: config.initInterp,
} }
c, err := compiler.NewCompiler(pkgName, compilerConfig) c, err := compiler.NewCompiler(pkgName, compilerConfig)