aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts/config.go
diff options
context:
space:
mode:
authorLucas Teske <[email protected]>2020-05-09 15:39:19 -0300
committerAyke <[email protected]>2020-07-31 00:58:09 +0200
commit3650c2c7397b5f21f61c1a4362b28596968c912f (patch)
tree7c331676822cb4109fb11967cea73e826f2bd138 /compileopts/config.go
parentd4e04e4e493aa4a99659361e28b22ecd51cceee3 (diff)
downloadtinygo-3650c2c7397b5f21f61c1a4362b28596968c912f.tar.gz
tinygo-3650c2c7397b5f21f61c1a4362b28596968c912f.zip
nintendoswitch: Add experimental Nintendo Switch support without CRT
Bare minimal nintendo switch support using LLD
Diffstat (limited to 'compileopts/config.go')
-rw-r--r--compileopts/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/compileopts/config.go b/compileopts/config.go
index 4c30d6b52..fdb26f01b 100644
--- a/compileopts/config.go
+++ b/compileopts/config.go
@@ -284,6 +284,16 @@ func (c *Config) CodeModel() string {
return "default"
}
+// RelocationModel returns the relocation model in use on this platform. Valid
+// values are "static", "pic", "dynamicnopic".
+func (c *Config) RelocationModel() string {
+ if c.Target.RelocationModel != "" {
+ return c.Target.RelocationModel
+ }
+
+ return "static"
+}
+
type TestConfig struct {
CompileTestBinary bool
// TODO: Filter the test functions to run, include verbose flag, etc