Browse Source
main: move "tinygo" build tag to compiler
Replace "tgo" with "tinygo" and set it always (even with `tinygo run`).
pull/91/head
Ayke van Laethem
6 years ago
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED
2 changed files with
2 additions and
2 deletions
-
compiler/compiler.go
-
main.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, |
|
|
|
} |
|
|
|
|
|
@ -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) |
|
|
|