aboutsummaryrefslogtreecommitdiffhomepage
path: root/target.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-11-28 17:33:16 +0100
committerAyke van Laethem <[email protected]>2018-11-28 17:34:57 +0100
commite817bd38ec539aa530088ac8f8455622605fff66 (patch)
treea711b1dead157a0767fe99e700af667e3dc24487 /target.go
parent05d70d288d8839a07bb681bcc2638c5c30bc6b80 (diff)
downloadtinygo-e817bd38ec539aa530088ac8f8455622605fff66.tar.gz
tinygo-e817bd38ec539aa530088ac8f8455622605fff66.zip
main: configure default GC in target JSON file
Diffstat (limited to 'target.go')
-rw-r--r--target.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/target.go b/target.go
index b8f73ddf6..117dac352 100644
--- a/target.go
+++ b/target.go
@@ -21,6 +21,7 @@ type TargetSpec struct {
Inherits []string `json:"inherits"`
Triple string `json:"llvm-target"`
BuildTags []string `json:"build-tags"`
+ GC string `json:"gc"`
Compiler string `json:"compiler"`
Linker string `json:"linker"`
RTLib string `json:"rtlib"` // compiler runtime library (libgcc, compiler-rt)
@@ -44,6 +45,9 @@ func (spec *TargetSpec) copyProperties(spec2 *TargetSpec) {
spec.Triple = spec2.Triple
}
spec.BuildTags = append(spec.BuildTags, spec2.BuildTags...)
+ if spec2.GC != "" {
+ spec.GC = spec2.GC
+ }
if spec2.Compiler != "" {
spec.Compiler = spec2.Compiler
}