compileopts: fix CGo when cross compiling

Use the cross compiling toolchains for compiling/linking. This fixes CGo
support, and therefore allows CGo to be used when cross compiling to
Linux on a different architecture.
This commit also removes some redundant testing code.
This commit is contained in:
Ayke van Laethem
2020-01-14 13:46:54 +01:00
committed by Ron Evans
parent d5e11fa19b
commit 8f8232aada
3 changed files with 14 additions and 11 deletions
+1 -8
View File
@@ -80,15 +80,8 @@ func runPlatTests(target string, matches []string, t *testing.T) {
if path == filepath.Join("testdata", "gc.go") {
continue
}
case target == "":
// run all tests on host
case target == "cortex-m-qemu":
// all tests are supported
default:
// cross-compilation of cgo is not yet supported
if path == filepath.Join("testdata", "cgo")+string(filepath.Separator) {
continue
}
// all tests are supported
}
t.Run(filepath.Base(path), func(t *testing.T) {