]> Cypherpunks repositories - gostls13.git/commitdiff
go/types/internal/gcimporter: update for 7g and 9g
authorShenghou Ma <minux@golang.org>
Wed, 8 Apr 2015 05:57:37 +0000 (01:57 -0400)
committerRobert Griesemer <gri@golang.org>
Wed, 8 Apr 2015 17:55:51 +0000 (17:55 +0000)
Change-Id: Ied1582d8aabee2eb346e1c23bfd7781e4a091264
Reviewed-on: https://go-review.googlesource.com/8621
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/internal/gcimporter/gcimporter.go
src/go/types/internal/gcimporter/gcimporter_test.go

index f6ac95f6332ddd799e3ca79273712e7fb3c7abba..c414bad73bab52f286599060e65f95e76c37ef32 100644 (file)
@@ -30,7 +30,7 @@ func init() {
        types.DefaultImport = Import
 }
 
-var pkgExts = [...]string{".a", ".5", ".6", ".8"}
+var pkgExts = [...]string{".a", ".5", ".6", ".7", ".8", ".9"}
 
 // FindPkg returns the filename and unique package id for an import
 // path based on package information provided by build.Import (using
index 31bfc4830e5f8f7dc4c29d9d523ed24d67f7427a..318e32b98a8292ccfd3b22919d38e8667ca0d670 100644 (file)
@@ -34,20 +34,11 @@ func skipSpecialPlatforms(t *testing.T) {
 var gcPath string // Go compiler path
 
 func init() {
-       // determine compiler
-       var gc string
-       switch runtime.GOARCH {
-       case "386":
-               gc = "8g"
-       case "amd64":
-               gc = "6g"
-       case "arm":
-               gc = "5g"
-       default:
-               gcPath = "unknown-GOARCH-compiler"
+       if char, err := build.ArchChar(runtime.GOARCH); err == nil {
+               gcPath = filepath.Join(build.ToolDir, char+"g")
                return
        }
-       gcPath = filepath.Join(build.ToolDir, gc)
+       gcPath = "unknown-GOARCH-compiler"
 }
 
 func compile(t *testing.T, dirname, filename string) string {