go/src/cmd
Ian Lance Taylor af161c577c cmd/go: depend on runtime/cgo if external linking mode is forced
In external linking mode, the linker automatically imports
runtime/cgo.  When the user uses non-standard compilation options,
they have to know to run go install runtime/cgo.  When the go tool
adds non-standard compilation options itself, we can't force the user
to do that.  So add the dependency ourselves.

Bad news: we don't currently have a clean way to know whether we are
going to use external linking mode.  This CL duplicates logic split
between cmd/6l and cmd/internal/ld.

Good news: adding an unnecessary dependency on runtime/cgo does no
real harm.  We aren't going to force the linker to pull it in, we're
just going to build it so that its available if the linker wants it.

Change-Id: Ide676339d4e8b1c3d9792884a2cea921abb281b7
Reviewed-on: https://go-review.googlesource.com/9115
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2015-04-21 17:35:33 +00:00
..
5g cmd/internal/gc: make use of new String methods in prints 2015-04-17 19:29:25 +00:00
5l cmd/internal/ld: prefer constants from cmd/internal/obj 2015-04-20 20:05:13 +00:00
6g cmd/6g: let the compiler use R15 when it is not needed for GOT indirection 2015-04-20 23:20:15 +00:00
6l cmd/6l, cmd/internal/ld, cmd/internal/obj: remove Xsym/Xadd from compiler's Reloc 2015-04-21 03:00:19 +00:00
7g cmd/...: fix vet issues and cull dead code 2015-04-18 01:47:28 +00:00
7l cmd/internal/ld: prefer constants from cmd/internal/obj 2015-04-20 20:05:13 +00:00
8g cmd/6g, etc: cleanup, moving code out of near-empty gg.go files 2015-04-18 00:11:23 +00:00
8l cmd/internal/ld: prefer constants from cmd/internal/obj 2015-04-20 20:05:13 +00:00
9g cmd/...: fix vet issues and cull dead code 2015-04-18 01:47:28 +00:00
9l cmd/internal/ld: prefer constants from cmd/internal/obj 2015-04-20 20:05:13 +00:00
addr2line cmd/addr2line: skip fork test on darwin/arm64 2015-04-12 11:53:24 +00:00
api go/importer: added go/importer package, adjusted go/types 2015-04-15 02:28:53 +00:00
asm cmd/internal/obj: remove useless Trimpath field and fix users 2015-04-20 20:46:06 +00:00
cgo cmd/cgo: more robust detection of clang 2015-04-18 01:11:44 +00:00
dist cmd/dist: run commands in $GOROOT/src not $GOROOT when possible 2015-04-20 19:54:01 +00:00
fix all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
go cmd/go: depend on runtime/cgo if external linking mode is forced 2015-04-21 17:35:33 +00:00
gofmt cmd/gofmt, go/format: refactor common pieces into internal/format 2015-04-01 17:35:26 +00:00
internal cmd/internal/obj: reuse the varint encoding buffer 2015-04-21 17:20:52 +00:00
link
nm cmd/nm: skip fork test on darwin/arm64 2015-04-12 11:52:22 +00:00
objdump cmd/objdump: skip fork test on darwin/arm64 2015-04-13 12:03:36 +00:00
old5a cmd/internal/obj: replace Addr.U struct {...} with Val interface{} 2015-03-20 04:47:08 +00:00
old6a cmd/internal/obj: replace Addr.U struct {...} with Val interface{} 2015-03-20 04:47:08 +00:00
old8a cmd/internal/obj: replace Addr.U struct {...} with Val interface{} 2015-03-20 04:47:08 +00:00
old9a cmd/internal/obj: replace Addr.U struct {...} with Val interface{} 2015-03-20 04:47:08 +00:00
pack cmd/pack: skip fork test on darwin/arm64 2015-04-13 11:58:27 +00:00
pprof cmd/pprof/internal/profile: insert blank line after non-doc comment 2015-03-16 23:07:15 +00:00
trace cmd/...: fix vet issues and cull dead code 2015-04-18 01:47:28 +00:00
yacc cmd/internal/gc, cmd/yacc: implement "expecting" syntax error messages 2015-04-07 00:18:02 +00:00