--- /dev/null
+# It's absurd, but builds with -compiler=gccgo used to fail to build module m.
+# golang.org/issue/34358
+
+cd m
+go build
+exists m$GOEXE
+rm m$GOEXE
+[exec:gccgo] go build -compiler=gccgo
+[exec:gccgo] exists m$GOEXE
+
+-- m/go.mod --
+module m
+-- m/main.go --
+package main
+func main() {}
}
for _, dir := range gd.dirs {
- full := filepath.Join(dir, path)
- pkgdir, pkg := filepath.Split(full)
- for _, p := range [...]string{
- full,
- full + ".gox",
- pkgdir + "lib" + pkg + ".so",
- pkgdir + "lib" + pkg + ".a",
- full + ".o",
- } {
- if fi, err := os.Stat(p); err == nil && !fi.IsDir() {
- return true
- }
+ full := filepath.Join(dir, path) + ".gox"
+ if fi, err := os.Stat(full); err == nil && !fi.IsDir() {
+ return true
}
}