aboutsummaryrefslogtreecommitdiff
path: root/lib/target.exp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/target.exp')
-rw-r--r--lib/target.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/target.exp b/lib/target.exp
index 132c1a3..57f3b3a 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -400,6 +400,26 @@ proc default_target_compile {source destfile type options} {
}
}
+ if { $i eq "go" } {
+ set compiler_type "go"
+ if {[board_info $dest exists goflags]} {
+ append add_flags " [board_info $dest goflags]"
+ }
+ if {[board_info $dest exists gocompiler]} {
+ set compiler [board_info $dest gocompiler]
+ } else {
+ set compiler [find_go]
+ }
+ if {[board_info $dest exists golinker]} {
+ set linker [board_info $dest golinker]
+ } else {
+ set linker [find_go_linker]
+ }
+ if {[board_info $dest exists golinker_opts_order]} {
+ set linker_opts_order [board_info $dest golinker_opts_order]
+ }
+ }
+
if { $i eq "rust" } {
set compiler_type "rust"
if {[board_info $dest exists rustflags]} {
@@ -472,6 +492,8 @@ proc default_target_compile {source destfile type options} {
global F77_FOR_TARGET
global F90_FOR_TARGET
global GNATMAKE_FOR_TARGET
+ global GO_FOR_TARGET
+ global GO_LD_FOR_TARGET
global RUSTC_FOR_TARGET
if {[info exists GNATMAKE_FOR_TARGET]} {
@@ -510,6 +532,15 @@ proc default_target_compile {source destfile type options} {
}
}
+ if { $compiler_type eq "go" } {
+ if {[info exists GO_FOR_TARGET]} {
+ set compiler $GO_FOR_TARGET
+ }
+ if {[info exists GO_LD_FOR_TARGET]} {
+ set linker $GO_LD_FOR_TARGET
+ }
+ }
+
if {[info exists RUSTC_FOR_TARGET]} {
if {$compiler_type eq "rust"} {
set compiler $RUSTC_FOR_TARGET