compileopts: refactor defaultTarget function

Move triple calculation into defaultTarget. It was separate for historic
reasons that no longer apply. Merging the code makes future changes
easier (in particular, softfloat support).

The new code is actually shorter than the old code even though it has
more comments.
This commit is contained in:
Ayke van Laethem
2024-07-30 18:28:01 +02:00
committed by Ron Evans
parent d6e73b4c68
commit 6efc6d2bb6
2 changed files with 83 additions and 92 deletions
-1
View File
@@ -64,7 +64,6 @@ func TestClangAttributes(t *testing.T) {
{GOOS: "windows", GOARCH: "amd64"},
{GOOS: "windows", GOARCH: "arm64"},
{GOOS: "wasip1", GOARCH: "wasm"},
{GOOS: "wasip2", GOARCH: "wasm"},
} {
name := "GOOS=" + options.GOOS + ",GOARCH=" + options.GOARCH
if options.GOARCH == "arm" {