LEFT | RIGHT |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package build | 5 package build |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "errors" | 9 "errors" |
10 "fmt" | 10 "fmt" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 | 254 |
255 // Default is the default Context for builds. | 255 // Default is the default Context for builds. |
256 // It uses the GOARCH, GOOS, GOROOT, and GOPATH environment variables | 256 // It uses the GOARCH, GOOS, GOROOT, and GOPATH environment variables |
257 // if set, or else the compiled code's GOARCH, GOOS, and GOROOT. | 257 // if set, or else the compiled code's GOARCH, GOOS, and GOROOT. |
258 var Default Context = defaultContext() | 258 var Default Context = defaultContext() |
259 | 259 |
260 var cgoEnabled = map[string]bool{ | 260 var cgoEnabled = map[string]bool{ |
261 "darwin/386": true, | 261 "darwin/386": true, |
262 "darwin/amd64": true, | 262 "darwin/amd64": true, |
| 263 "dragonfly/386": true, |
263 "dragonfly/amd64": true, | 264 "dragonfly/amd64": true, |
264 "freebsd/386": true, | 265 "freebsd/386": true, |
265 "freebsd/amd64": true, | 266 "freebsd/amd64": true, |
266 "freebsd/arm": true, | 267 "freebsd/arm": true, |
267 "linux/386": true, | 268 "linux/386": true, |
268 "linux/amd64": true, | 269 "linux/amd64": true, |
269 "linux/arm": true, | 270 "linux/arm": true, |
270 "netbsd/386": true, | 271 "netbsd/386": true, |
271 "netbsd/amd64": true, | 272 "netbsd/amd64": true, |
272 "netbsd/arm": true, | 273 "netbsd/arm": true, |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 switch goarch { | 1149 switch goarch { |
1149 case "386": | 1150 case "386": |
1150 return "8", nil | 1151 return "8", nil |
1151 case "amd64": | 1152 case "amd64": |
1152 return "6", nil | 1153 return "6", nil |
1153 case "arm": | 1154 case "arm": |
1154 return "5", nil | 1155 return "5", nil |
1155 } | 1156 } |
1156 return "", errors.New("unsupported GOARCH " + goarch) | 1157 return "", errors.New("unsupported GOARCH " + goarch) |
1157 } | 1158 } |
LEFT | RIGHT |