1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:21:21 -06:00
Commit Graph

53 Commits

Author SHA1 Message Date
Shenghou Ma
52ec4aa24a cmd/dist: remove stray src/pkg/runtime/z* when cleaning
R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044
2012-05-04 00:58:48 +08:00
Anthony Martin
3859032980 build: dist-based build for Plan 9
R=rsc, iant, iant, seed
CC=golang-dev
https://golang.org/cl/5608059
2012-05-01 22:32:46 -07:00
Alexey Borzenkov
0669261af1 cmd/dist: don't fail when Mercurial is a batch file on Windows
On windows Mercurial installed with easy_install typically creates
an hg.bat batch file in Python Scripts directory, which cannot be used
with CreateProcess unless full path is specified. Work around by
launching hg via cmd.exe /c.

Additionally, fix a rare FormatMessageW crash.

Fixes #3093.

R=golang-dev, rsc, alex.brainman, aram, jdpoirier, mattn.jp
CC=golang-dev
https://golang.org/cl/5937043
2012-04-09 15:39:59 -04:00
Shenghou Ma
a9de5bb3eb cmd/dist, sudo.bash: don't mention sudo.bash if cov or prof is not present
Fixes #3422.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5967057
2012-04-02 22:33:38 +08:00
Russ Cox
901ee5c151 cmd/dist: fix detection of go1 version
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5924044
2012-03-27 00:17:35 -04:00
Brad Fitzpatrick
86c7bc6e8b misc/dist: don't ship cmd/cov or cmd/prof
Fixes #3317

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5784083
2012-03-15 15:22:56 -07:00
Shenghou Ma
6d4da06d36 cmd/dist, cmd/go: move CGO_ENABLED from 'go tool dist env' to 'go env'
So that we don't duplicate knowledge about which OS/ARCH combination
        supports cgo.
        Also updated src/run.bash and src/sudo.bash to use 'go env'.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5792055
2012-03-10 03:42:23 +08:00
Shenghou Ma
c086bc1d7d cmd/dist: fix build for Linux/ARM
find() returns -1 when not found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752068
2012-03-07 14:24:28 +08:00
Russ Cox
c3f4319a24 misc/cgo: re-enable some tests
The testso directory still needs to be enabled.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5731048
2012-03-06 23:27:30 -05:00
Alex Brainman
36708a40e0 cmd/dist: use correct hg tag for go version
When looking for suitable tag always start
from current version, not the tip.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5731059
2012-03-06 17:21:39 +11:00
Russ Cox
6e3a7930eb cmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files
GOROOT_FINAL is a build parameter that means "eventually
the Go tree will be installed here".  Make the file name information
match that eventual location.

Fixes #3180.

R=ken, ken
CC=golang-dev
https://golang.org/cl/5742043
2012-03-05 16:13:33 -05:00
Russ Cox
3c3c5f38a0 cmd/dist: Unix grammar fix
Fixes #3165.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5712051
2012-03-01 13:38:05 -05:00
Russ Cox
03769efe41 cmd/dist: recognize CC="ccache clang" as clang
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5711052
2012-03-01 11:46:13 -05:00
Russ Cox
6e2ae0a12c runtime/pprof: support OS X CPU profiling
Work around profiling kernel bug with signal masks.
Still broken on 64-bit Snow Leopard kernel,
but I think we can ignore that one and let people
upgrade to Lion.

Add new trivial tools addr2line and objdump to take
the place of the GNU tools of the same name, since
those are not installed on OS X.

Adapt pprof to invoke 'go tool addr2line' and
'go tool objdump' if the system tools do not exist.

Clean up disassembly of base register on amd64.

Fixes #2008.

R=golang-dev, bradfitz, mikioh.mikioh, r, iant
CC=golang-dev
https://golang.org/cl/5697066
2012-02-28 16:18:24 -05:00
Shenghou Ma
26daf6a03f cmd/dist: force line-buffering stdout/stderr on Unix
If stdout and stderr are indeed the same file (not a tty), which is
        often the case, fully-buffered stdout will make it harder to see
        progresses, for example, ./make.bash 2>&1 | tee log

R=r, rsc
CC=golang-dev
https://golang.org/cl/5700070
2012-02-29 02:22:28 +08:00
Scott Lawrence
7ae6872fc0 dist: treat CC as one unit
Fixes #3112.

R=golang-dev, 0xe2.0x9a.0x9b, ality, rsc, rsc
CC=golang-dev
https://golang.org/cl/5700044
2012-02-23 15:38:07 -05:00
Russ Cox
37decab5a3 cmd/dist: fix install cmd/5g on non-arm system
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5689072
2012-02-22 16:29:05 -05:00
Bobby Powers
d36426995a cmd/dist: fix pprof permissions
When installing pprof into the tools directory, it needs to
have execute permissions on unix-like systems.

Fixes issues 3077.

R=golang-dev, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/5675095
2012-02-21 16:49:30 -05:00
Robert Griesemer
b6e2d6b778 go/doc: move Example code from go/ast to go/doc.
Fixes #3048.

R=rsc
CC=golang-dev
https://golang.org/cl/5672081
2012-02-17 12:00:12 -08:00
Shenghou Ma
710d0540e2 cmd/dist: make dir check in defaulttarg() more robust
1, strip last path separator from $GOROOT
   The user might define GOROOT=/path/to/go/, but then the dir
   check in defaulttarg() will always complain the current dir
   is not within $GOROOT/src/.
2, resolve symlinks in the default goroot
   Or if getcwd() returns a fully-resolved path, the check in
   defaulttarg() will always fail.

R=rsc
CC=golang-dev
https://golang.org/cl/5649073
2012-02-17 11:29:34 -05:00
Bobby Powers
7c2bfa4f2c dist: add clang specific -Wno options
Clang 3.1 has more warnings enabled by default than GCC.
Combined with -Werror, they cause the build to fail
unnecessarily.  if the name of our compiler ends in "clang",
add the necessary extra -Wno options.  Ideally we would add
these flags unconditionally, as GCC is supposed to ignore
unknown -Wno flags, but apple's llvm-gcc doesn't.

Fixes #2878.

R=rsc, dave
CC=golang-dev
https://golang.org/cl/5673055
2012-02-16 13:31:46 -05:00
Russ Cox
2506fd43d4 build: add make.bash --no-clean option
Makes it possible to run

GOARCH=amd64 make.bash
GOARCH=386 make.bash --no-clean

to avoid deleting some of the work done by the first one.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5673056
2012-02-15 11:48:17 -05:00
Alex Brainman
def2022bc0 cmd/dist: use correct package target when cross-compiling
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5672050
2012-02-15 09:02:45 -05:00
Yasuhiro Matsumoto
6fae34db94 cmd/dist: xprintf() can't output whole of 'dist env'.
R=golang-dev, mpimenov, alex.brainman
CC=golang-dev
https://golang.org/cl/5667045
2012-02-15 14:25:27 +11:00
Russ Cox
82568c5cd5 cmd/dist: exclude cov and prof from releases
Also check for old and exp.

Fixes #2764.
Fixes #2765.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5654068
2012-02-14 00:18:30 -05:00
Russ Cox
7b848c6964 cmd/dist: cross-compiling fixes
This CL makes it possible to run make.bash with
GOOS and GOARCH set to something other than
the native host GOOS and GOARCH.

As part of the CL, the tool directory moves from bin/tool/
to pkg/tool/goos_goarch where goos and goarch are
the values for the host system (running the build), not
the target.  pkg/ is not technically appropriate, but C objects
are there now tool (pkg/obj/) so this puts all the generated
binaries in one place (rm -rf $GOROOT/pkg cleans everything).
Including goos_goarch in the name allows different systems
to share a single $GOROOT on a shared file system.

Fixes #2920.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645093
2012-02-13 22:31:51 -05:00
Russ Cox
1f2445d27b gc: delete old unsafe functions
Also update build to be able to run mkbuiltin again.
The export form has changed a little, so builtin.c has
more diffs than unsafe.go.

In CL 5650069, I just edited the documentation, a rarely
successful method of change.

R=ken2
CC=golang-dev
https://golang.org/cl/5662043
2012-02-13 15:37:35 -05:00
Russ Cox
aa87d78cf6 cmd/dist: encoding/gob is no longer required for cmd/go
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5650068
2012-02-12 23:15:07 -05:00
Mikio Hara
f842dc160b cmd/dist: clear execute bit from source file
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651072
2012-02-11 13:23:44 +09:00
Gustavo Niemeyer
dbac863ed8 cmd/dist: reset version during bootstrap
Fixes #2927.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5651062
2012-02-10 22:26:36 -02:00
Daniel Theophanes
ef1d2a32ea dist: prevent recusive loop on windows when fatal() is called.
Fixes #2931.

R=golang-dev, alex.brainman
CC=golang-dev, rsc
https://golang.org/cl/5651049
2012-02-09 23:10:27 -05:00
Gustavo Niemeyer
54f1e1b163 cmd/dist: fix GOROOT_FINAL
R=rsc, gustavo
CC=golang-dev
https://golang.org/cl/5642045
2012-02-09 20:47:12 -02:00
Alex Brainman
eaf640dbc4 cmd/dist: do not use HEAP_GENERATE_EXCEPTIONS flag
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5650048
2012-02-10 09:14:00 +11:00
Shenghou Ma
119917375b cmd/dist: redure max background tasks nr. when building on ARM
R=rsc
CC=golang-dev
https://golang.org/cl/5642063
2012-02-08 16:26:00 -05:00
Russ Cox
596840a905 cmd/dist: make 'make' quieter for developers
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5646055
2012-02-08 15:26:47 -05:00
Shenghou Ma
1127b22976 cmd/dist: pass correct -DGOARCH_$GOARCH flag to gcc.
R=rsc
CC=golang-dev
https://golang.org/cl/5643061
2012-02-08 14:36:38 -05:00
Dmitriy Vyukov
bd37349485 cmd/dist: fix copying of cmd/prof
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5642059
2012-02-08 20:15:17 +04:00
Russ Cox
136f12f51f cmd/dist: pass -m32 or -m64 to link too, not just compile
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5646053
2012-02-08 11:12:14 -05:00
Russ Cox
5b93fc9da6 runtime, pprof: add profiling of thread creation
Same idea as heap profile: how did each thread get created?
Low memory (256 bytes per OS thread), high reward for
programs that suddenly have many threads running.

Fixes #1477.

R=golang-dev, r, dvyukov
CC=golang-dev
https://golang.org/cl/5639059
2012-02-08 10:33:54 -05:00
Russ Cox
3f6a517db6 cmd/dist: respect $CC, as quietgcc.bash used to
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5641051
2012-02-08 00:22:38 -05:00
Gustavo Niemeyer
c2fe6634db cmd/dist: prevent race on VERSION creation
Commands such as "dist version > VERSION" will cause
the shell to create an empty VERSION file and set dist's
stdout to its fd. dist in turn looks at VERSION and uses
its content if available, which is empty at this point.

Fix that by ignoring VERSION if it's empty.

Also prevent cmdversion from running findgoversion a
second time. It was already loaded by init.

R=adg, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5639044
2012-02-07 00:38:15 -02:00
Russ Cox
e335ec98b5 cmd/dist: ignore file names beginning with . or _
This is the same heuristic that build.ScanDir uses.
It avoids considering 'resource fork' files on OS X;
the resource for x.go is ._x.go.

R=gri
CC=golang-dev
https://golang.org/cl/5616073
2012-02-06 13:33:22 -05:00
Alex Brainman
c06bd52a2e cmd/dist: fix bug in bsubst
R=golang-dev, r, dsymonds, akumar
CC=golang-dev
https://golang.org/cl/5624054
2012-02-05 15:16:39 +11:00
Gustavo Niemeyer
1d69b12445 cmd/dist: add GOBIN to env's output
clean.bash depends on it being set.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5630056
2012-02-05 00:35:08 -02:00
Russ Cox
57b7bbe988 cmd/dist: fix memory bug (fix builders?)
Thanks, Valgrind!

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5630050
2012-02-04 02:15:53 -05:00
Russ Cox
a19ab9d1cc cmd/dist: fix arm build
5l does not use the whole set of ld files
like the other linkers do.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629052
2012-02-04 02:01:58 -05:00
Russ Cox
650e8de0a5 cmd/dist: more build fixes
Flush stdout before writing to stderr, to avoid
reordering output.

Allow amd64 from uname -m (FreeBSD).

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629051
2012-02-04 01:46:46 -05:00
Russ Cox
68576506d6 cmd/dist: add BSD gohostos cases
Should fix FreeBSD build.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629050
2012-02-04 01:39:29 -05:00
Russ Cox
b8b2253ac7 cmd/dist: fix build
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5630049
2012-02-04 01:23:54 -05:00
Russ Cox
4c1abd6c64 build: dist-based build for windows
R=golang-dev, bradfitz, iant, alex.brainman, go.peter.90
CC=golang-dev
https://golang.org/cl/5630047
2012-02-04 00:48:31 -05:00