Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

fix 1.9.4 cross compile problem #737

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func (t *gcToolchain) Gc(pkg *Package, files []string) error {
for _, d := range pkg.includePaths() {
args = append(args, "-I", d)
}

if (version.Version > 1.8) && pkg.Goroot {
// stdlib with special std flag
args = append(args, "-std")
}

if pkg.Goroot && pkg.ImportPath == "runtime" {
// runtime compiles with a special gc flag to emit
// additional reflect type data.
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version16.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build go1.6
// +build !go1.7,!go1.8
// +build !go1.7,!go1.8,!go1.9,!go1.10

package version

Expand Down
2 changes: 1 addition & 1 deletion internal/version/version17.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build go1.7
// +build !go1.8
// +build !go1.8,!go1.9,!go1.10

package version

Expand Down
1 change: 1 addition & 0 deletions internal/version/version18.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build go1.8
// +build !go1.9,!go1.10

package version

Expand Down
7 changes: 7 additions & 0 deletions internal/version/version19.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build go1.9,go1.10

package version

const (
Version = 1.9
)