diff options
author | Ayke van Laethem <[email protected]> | 2021-09-22 02:37:10 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-10-04 18:22:55 +0200 |
commit | 0a80da46b1eca3cc5da51633b95d5a31b949a59b (patch) | |
tree | 93683585a6409eba62357e33f11ae191865fc1c5 /transform | |
parent | 36f1517e8dbd84ab0c8c2ad4fc9ed8fdca09500b (diff) | |
download | tinygo-0a80da46b1eca3cc5da51633b95d5a31b949a59b.tar.gz tinygo-0a80da46b1eca3cc5da51633b95d5a31b949a59b.zip |
main: test other architectures by specifying a different GOARCH
... instead of setting a special -target= value. This is more robust and
makes sure that the test actually tests different arcitectures as they
would be compiled by TinyGo. As an example, the bug of the bugfix in the
previous commit ("arm: use armv7 instead of thumbv7") would have been
caught if this change was applied earlier.
I've decided to put GOOS/GOARCH in compileopts.Options, as it makes
sense to me to treat them the same way as command line parameters.
Diffstat (limited to 'transform')
-rw-r--r-- | transform/transform_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/transform_test.go b/transform/transform_test.go index 0b4cc0d2b..f16baabd4 100644 --- a/transform/transform_test.go +++ b/transform/transform_test.go @@ -140,7 +140,7 @@ func filterIrrelevantIRLines(lines []string) []string { // run. // If there are any errors, they are reported via the *testing.T instance. func compileGoFileForTesting(t *testing.T, filename string) llvm.Module { - target, err := compileopts.LoadTarget("i686--linux") + target, err := compileopts.LoadTarget(&compileopts.Options{GOOS: "linux", GOARCH: "386"}) if err != nil { t.Fatal("failed to load target:", err) } |