8000 Disable cgo for cross-compilation · u-root/u-root@40ad4cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 40ad4cd

Browse files
committed
Disable cgo for cross-compilation
Signed-off-by: Chris Koch <chrisko@google.com>
1 parent 4431a16 commit 40ad4cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/termios/termios_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func TestCrossCompile(t *testing.T) {
316316
t.Parallel()
317317
outFile := filepath.Join(td, goos+"-"+goarch+".test")
318318
cmd := exec.Command("go", "test", "-c", "-o", outFile, ".")
319-
cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch)
319+
cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch, "CGO_ENABLED=0")
320320
if out, err := cmd.CombinedOutput(); err != nil {
321321
t.Fatalf("Failed: %v, %s", err, out)
322322
}

0 commit comments

Comments
 (0)
0