mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/objdump: don't run TestDisasmExtld if cgo is not enabled
The test uses external linking mode, which is probably not available if cgo does not work. Fixes #11969. Change-Id: Id1c2828cd2540391e16b422bf51674ba6ff084b0 Reviewed-on: https://go-review.googlesource.com/13005 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
296529b734
commit
384789e82b
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
"internal/testenv"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
|
@ -123,5 +124,8 @@ func TestDisasmExtld(t *testing.T) {
|
|||
if runtime.GOOS == "openbsd" && runtime.GOARCH == "arm" {
|
||||
t.Skip("skipping on openbsd/arm, no support for external linking, issue 10619")
|
||||
}
|
||||
if !build.Default.CgoEnabled {
|
||||
t.Skip("skipping because cgo is not enabled")
|
||||
}
|
||||
testDisasm(t, "-ldflags=-linkmode=external")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue