"os"
"os/exec"
"path/filepath"
- "runtime"
"strings"
"testing"
"time"
func TestDWARFSections(t *testing.T) {
// test that DWARF sections are emitted for plugins and programs importing "plugin"
- if runtime.GOOS != "darwin" {
- // On macOS, for some reason, the linker doesn't add debug sections to .so,
- // see issue #27502.
- goCmd(t, "run", "./checkdwarf/main.go", "plugin2.so", "plugin2.UnexportedNameReuse")
- }
+ goCmd(t, "run", "./checkdwarf/main.go", "plugin2.so", "plugin2.UnexportedNameReuse")
goCmd(t, "run", "./checkdwarf/main.go", "./host.exe", "main.main")
}
case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/s390x", "linux/ppc64le",
"android/amd64", "android/arm", "android/arm64", "android/386":
case "darwin/amd64":
- // Skip DWARF generation due to #21647
- forcedLdflags = append(forcedLdflags, "-w")
case "freebsd/amd64":
default:
base.Fatalf("-buildmode=plugin not supported on %s\n", platform)