aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-08-31 15:31:45 +0200
committerRon Evans <[email protected]>2022-09-01 16:23:24 +0200
commit5f6cf665f5dc82cfcd8d1ec308490340c429b13b (patch)
treecb8fe7c12a754b6edb88d226923af04e81a039fa /compileopts
parentc6db89ff05ab598c6ce51b092b835cb01ca9d2c8 (diff)
downloadtinygo-5f6cf665f5dc82cfcd8d1ec308490340c429b13b.tar.gz
tinygo-5f6cf665f5dc82cfcd8d1ec308490340c429b13b.zip
compileopts: fix windows/arm target triple
This is just a papercut, and not really something important. But I noticed something weird: $ GOOS=windows GOARCH=arm tinygo info "" LLVM triple: armv7-unknown-windows-gnueabihf-gnu GOOS: windows GOARCH: arm That -gnueabihf-gnu ending is weird, it should pick one of the two. I've fixed it as follows: $ GOOS=windows GOARCH=arm tinygo info "" LLVM triple: armv7-unknown-windows-gnu GOOS: windows GOARCH: arm [...] We're probably never going to support windows/arm (this is 32-bit arm, not arm64) so it doesn't really matter which one we pick. And this patch shouldn't affect any other system.
Diffstat (limited to 'compileopts')
-rw-r--r--compileopts/target.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/compileopts/target.go b/compileopts/target.go
index aa2c432d4..b2c44ce4d 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -202,11 +202,10 @@ func LoadTarget(options *Options) (*TargetSpec, error) {
// triples for historical reasons) have the form:
// arch-vendor-os-environment
target := llvmarch + "-unknown-" + llvmos
- if options.GOARCH == "arm" {
- target += "-gnueabihf"
- }
if options.GOOS == "windows" {
target += "-gnu"
+ } else if options.GOARCH == "arm" {
+ target += "-gnueabihf"
}
return defaultTarget(options.GOOS, options.GOARCH, target)
}