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

29 Commits

Author SHA1 Message Date
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
Mikio Hara
67b277c3b9 cmd/dist: fix build on openbsd
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5608060
2012-02-04 13:27:12 +09:00
Russ Cox
c6c00ed482 cmd/dist: generate files for package runtime
goc2c moves here.
parallel builds like old makefiles (-j4).
add clean command.
add banner command.
implement Go version check.
real argument parsing (same as 6g etc)

Windows changes will be a separate CL.

R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5622058
2012-02-03 18:16:42 -05:00
Russ Cox
3dd1e5be54 cmd/dist: new command
dist is short for distribution.  This is the new Go distribution tool.

The plan is to replace the Makefiles with what amounts to
'go tool dist bootstrap', although it cannot be invoked like
that since it is in charge of getting us to the point where we
can build the go command.

It will also add additional commands to replace bash scripts
like test/run (go tool dist testrun), eventually eliminating our
dependence on not just bash but all the Unix tools and all
of cygwin.

This is strong enough to build (cc *.c) and run (a.out bootstrap)
to build not just the C libraries and tools but also the basic
Go packages up to the bootstrap form of the go command
(go_bootstrap).  I've run it successfully on both Linux and Windows.
This means that once we've switched to this tool in the build,
we can delete the buildscripts.

This tool is not nearly as nice as the go tool.  There are many
special cases that turn into simple if statements or tables in
the code.  Please forgive that.  C does not enjoy the benefits
that we designed into Go.

I was planning to wait to do this until after Go 1, but the
Windows builders are both broken due to a bug in either
make or bash or both involving the parsing of quoted command
arguments.  Make thinks it is invoking

        quietgcc -fno-common -I"c:/go/include" -ggdb -O2 -c foo.c

but bash (quietgcc is a bash script) thinks it is being invoked as

        quietgcc -fno-common '-Ic:/go/include -ggdb' -O2 -c foo.c

which obviously does not have the desired effect.  Rather than fight
these clumsy ports, I accelerated the schedule for the new tool.
We should be completely off cygwin (using just the mingw gcc port,
which is much more standalone) before Go 1.

It is big for a single CL, and for that I apologize.  I can cut it into
separate CLs along file boundaries if people would prefer that.

R=golang-dev, adg, gri, bradfitz, alex.brainman, dsymonds, iant, ality, hcwfrichter
CC=golang-dev
https://golang.org/cl/5620045
2012-02-02 19:41:39 -05:00