| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]
Make gcToolchain.cc return an error (no C compiler!).
Adjust expectations of cgo, now that cgo does not write any C files
(no C compiler!).
For packages with .s files, invoke Go compiler with -asmhdr go_asm.h
so that assembly files can use it. This applies to all packages but is only
needed today by package runtime.
LGTM=r
R=r
CC=austin, golang-codereviews, iant, khr
https://codereview.appspot.com/171470043
|
|
|
|
|
|
|
|
|
| |
Fixes issue 9065.
LGTM=rsc
R=rsc, misch
CC=golang-codereviews
https://codereview.appspot.com/171270043
|
|
|
|
|
|
|
|
|
| |
LGTM=iant
R=iant, minux
CC=golang-codereviews, golang-dev
https://codereview.appspot.com/157460043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
| |
conflicts
Fixes issue 8828.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/154410043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today, 'go build -a my/pkg' and 'go install -a my/pkg'
recompile not just my/pkg and all its dependencies that
you wrote but also the standard library packages.
Recompiling the standard library is problematic on
some systems because the installed copy is not writable.
The -a behavior means that you can't use 'go install -a all'
or 'go install -a my/...' to rebuild everything after a Go
release - the rebuild stops early when it cannot overwrite
the installed standard library.
During development work, however, you do want install -a
to rebuild everything, because anything might have changed.
Resolve the conflict by making the behavior of -a depend
on whether we are using a released copy of Go or a devel copy.
In the release copies, -a no longer applies to the standard library.
In the devel copies, it still does.
This is the latest in a long line of refinements to the
"do I build this or not" logic. It is surely not the last.
Fixes issue 8290.
LGTM=r
R=golang-codereviews, r, tracey.brendan
CC=adg, golang-codereviews, iant
https://codereview.appspot.com/151730045
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue 8130.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://codereview.appspot.com/143200043
Committer: Russ Cox <rsc@golang.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix by atom (from CL 89190044), comment and test by me.
Fixes issue 6823.
LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=0xe2.0x9a.0x9b, adg, golang-codereviews, iant, r
https://codereview.appspot.com/148180043
|
|
|
|
|
|
|
|
|
| |
Fixes issue 8242.
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/147150043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not sure why they used empty.s and all these other
packages were special cased in cmd/go instead.
Add them to the list.
This avoids problems with net .s files being compiled
with gcc in cgo mode and gcc not supporting // comments
on ARM.
Not a problem with bytes, but be consistent.
The last change fixed the ARM build but broke the Windows build.
Maybe *this* will make everyone happy. Sigh.
TBR=iant
CC=golang-codereviews
https://codereview.appspot.com/144530046
|
|
|
|
|
|
|
|
|
| |
Fixes issue 8788.
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/142470043
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
files.
Fixes issue 8566.
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/126210045
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adjusts code referring to src/pkg to refer to src.
Immediately after submitting this CL, I will submit
a change doing 'hg mv src/pkg/* src'.
That change will be too large to review with Rietveld
but will contain only the 'hg mv'.
This CL will break the build.
The followup 'hg mv' will fix it.
For more about the move, see golang.org/s/go14nopkg.
LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/134570043
|
|
|
|
|
|
|
| |
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/127410043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The file is used by assembly code to define symbols like NOSPLIT.
Having it hidden inside the cmd directory makes it hard to access
outside the standard repository.
Solution: As with a couple of other files used by cgo, copy the
file into the pkg directory and add a -I argument to the assembler
to access it. Thus one can write just
#include "textflag.h"
in .s files.
The names in runtime are not updated because in the boot sequence the
file has not been copied yet when runtime is built. All other .s files
in the repository are updated.
Changes to doc/asm.html, src/cmd/dist/build.c, and src/cmd/go/build.go
are hand-made. The rest are just the renaming done by a global
substitution. (Yay sam).
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/128050043
|
|
|
|
|
|
|
|
| |
According to the OpenBSD builder, it doesn't work.
TBR=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/126830043
|
|
|
|
|
|
|
|
| |
According to the FreeBSD builder, it doesn't work.
TBR=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/121400043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some systems, like Ubuntu, pass --build-id when linking. The
effect is to put a note in the output file. This is not
useful when generating an object file with the -r option, as
it eventually causes multiple build ID notes in the final
executable, all but one of which are for tiny portions of the
file and are therefore useless.
Disable that by passing an explicit --build-id=none when
linking with -r on systems that might do this.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/119460043
|
|
|
|
|
|
|
|
|
| |
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/117470043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This variable allows users to select the compiler when using the
gccgo toolchain.
LGTM=rsc
R=rsc, iant, minux, aram
CC=axwalk, golang-codereviews
https://codereview.appspot.com/106700044
Committer: Russ Cox <rsc@golang.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(This is a patch from the pkgsrc Go package.)
LGTM=iant
R=golang-codereviews, iant, joerg.sonnenberger, dave
CC=golang-codereviews, joerg
https://codereview.appspot.com/108340043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
| |
LGTM=dave, iant
R=iant, dave
CC=golang-codereviews
https://codereview.appspot.com/112000043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue 8165.
After this change, the panic is replaced by a message:
$ go build -o out ...doesntexist
warning: "...doesntexist" matched no packages
no packages to build
The motivation to return 1 exit error code is to allow -o flag
to be used to guarantee that the output binary is written to
when exit status is 0. If someone uses an import path pattern
to specify a single package and suddenly that matches no packages,
it's better to return exit code 1 instead of silently doing nothing.
This is consistent with the case when -o flag is given and multiple
packages are matched.
It's also somewhat consistent with the current behavior with the
panic, except that gave return code 2. But it's similar in
that it's also non-zero (indicating failure).
I've changed the language to be similar to output of go test
when an import path pattern matches no packages (it also has a return status of
1):
$ go test ...doesntexist
warning: "...doesntexist" matched no packages
no packages to test
LGTM=adg
R=golang-codereviews, josharian, gobot, adg
CC=golang-codereviews
https://codereview.appspot.com/107140043
Committer: Andrew Gerrand <adg@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on cl/69170045 by Elias Naur.
There are currently several schemes for acquiring a TLS
slot to save the g register. None of them appear to work
for android. The closest are linux and darwin.
Linux uses a linker TLS relocation. This is not supported
by the android linker.
Darwin uses a fixed offset, and calls pthread_key_create
until it gets the slot it wants. As the runtime loads
late in the android process lifecycle, after an
arbitrary number of other libraries, we cannot rely on
any particular slot being available.
So we call pthread_key_create, take the first slot we are
given, and put it in runtime.tlsg, which we turn into a
regular variable in cmd/ld.
Makes android/arm cgo binaries work.
LGTM=minux
R=elias.naur, minux, dave, josharian
CC=golang-codereviews
https://codereview.appspot.com/106380043
|
|
|
|
|
|
|
|
|
| |
All tests pass except one test in regexp package.
LGTM=iant
R=golang-codereviews, iant, dave
CC=golang-codereviews
https://codereview.appspot.com/107270043
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7983.
LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews, rsc
https://codereview.appspot.com/96540044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change requires using SWIG version 3.0 or later. Earlier
versions of SWIG do not generate the pragmas required to use
the external linker.
Fixes issue 7155.
Fixes issue 7156.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/97120046
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7915.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/96210044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
list has been adding them one at a time haphazardly
(race and tags were there and documented; compiler
was there and undocumented).
clean -i needs -compiler in order to clean the
installed targets for alternate compilers.
Fixes issue 7302.
While we're here, tweak the language in the 'go get' docs
about build flags.
Fixes issue 7807.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/99130043
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7071.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/93770044
|
|
|
|
|
|
|
|
|
|
|
|
| |
go test may call builder.init() multiple times which will create a new work directory. The cleanup needs to hoist the current work directory.
Fixes issue 7904.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/95900044
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we compile a generated file stored in a temporary
directory - let's say /tmp/12345/work/x.c - then by default
6c stores the full path and then the pcln table in the
final binary includes the full path. This makes repeated builds
(using different temporary directories) produce different
binaries, even if the inputs are the same.
In the old 'go tool pack', the P flag specified a prefix to remove
from all stored paths (if present), and cmd/go invoked
'go tool pack grcP $WORK' to remove references to the
temporary work directory.
We've changed the build to avoid pack as much as possible,
under the theory that instead of making pack convert from
.6 to .a, the tools should just write the .a directly and save a
round of I/O.
Instead of going back to invoking pack always, define a common
flag -trimpath in the assemblers, C compilers, and Go compilers,
implemented in liblink, and arrange for cmd/go to use the flag.
Then the object files being written out have the shortened paths
from the start.
While we are here, reimplement pcln support for GOROOT_FINAL.
A build in /tmp/go uses GOROOT=/tmp/go, but if GOROOT_FINAL=/usr/local/go
is set, then a source file named /tmp/go/x.go is recorded instead as
/usr/local/go/x.go. We use this so that we can prepare distributions
to be installed in /usr/local/go without actually working in that
directory. The conversion to liblink deleted all the old file name
handling code, including the GOROOT_FINAL translation.
Bring the GOROOT_FINAL translation back.
Before this CL, using GOROOT_FINAL=/goroot make.bash:
g% strings $(which go) | grep -c $TMPDIR
6
g% strings $(which go) | grep -c $GOROOT
793
g%
After this CL:
g% strings $(which go) | grep -c $TMPDIR
0
g% strings $(which go) | grep -c $GOROOT
0
g%
(The references to $TMPDIR tend to be cgo-generated source files.)
Adding the -trimpath flag to the assemblers required converting
them to the new Go-semantics flag parser. The text in go1.3.html
is copied and adjusted from go1.1.html, which is when we applied
that conversion to the compilers and linkers.
Fixes issue 6989.
LGTM=iant
R=r, iant
CC=golang-codereviews
https://codereview.appspot.com/88300045
|
|
|
|
|
|
|
|
|
| |
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/85070043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you compile a program that has cgo LDFLAGS directives, those are exported to an environment variable to be used by subsequent compiler tool invocations. The linking phase when using the gccgo toolchain did not consider the envvar CGO_LDFLAGS's linking directives resulting in undefined references when using cgo+gccgo.
Fixes issue 7573
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/80780043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7627.
CL 61970044 changed the order in which .a files are passed to gccgo's link phase. However by reversing the order it caused gccgo to complain if both internal (liba.a) and external (liba_test.a) versions of a package were presented as the former would not contain all the necessary symbols, and the latter would duplicate symbols already defined.
This change ensures that all 'fake' targets remain at the top of the final link order which should be fine as a package compiled as an external test is a superset of its internal sibling.
Looking at how gcToolchain links tests I think this change now accurately mirrors those actions which present $WORK/_test before $WORK in the link order.
LGTM=iant
R=rsc, iant
CC=golang-codereviews, michael.hudson
https://codereview.appspot.com/80300043
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7249
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/75820046
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7262
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/76110043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under some circumstances, gccgoToolchain's ld can pass the path of
build outputs that have been deleted to the link command.
Fixes issue 7303.
LGTM=rsc
R=golang-codereviews, dave, michael.hudson, rsc
CC=golang-codereviews
https://codereview.appspot.com/61970044
Committer: Russ Cox <rsc@golang.org>
|
|
|
|
|
|
|
|
|
| |
Fixes issue 6882
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://codereview.appspot.com/72080043
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CgoFiles to the covered files when building
with cover support.
LGTM=rsc
R=golang-codereviews, gobot, r, rsc
CC=golang-codereviews
https://codereview.appspot.com/34680044
Committer: Russ Cox <rsc@golang.org>
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7438.
LGTM=rsc
R=golang-codereviews
CC=bradfitz, golang-codereviews, iant, rsc
https://codereview.appspot.com/70420044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See golang.org/s/go13nacl for design overview.
This CL is the mostly mechanical changes from rsc's Go 1.2 based NaCl branch, specifically 39cb35750369 to 500771b477cf from https://code.google.com/r/rsc-go13nacl. This CL does not include working NaCl support, there are probably two or three more large merges to come.
CL 15750044 is not included as it involves more invasive changes to the linker which will need to be merged separately.
The exact change lists included are
15050047: syscall: support for Native Client
15360044: syscall: unzip implementation for Native Client
15370044: syscall: Native Client SRPC implementation
15400047: cmd/dist, cmd/go, go/build, test: support for Native Client
15410048: runtime: support for Native Client
15410049: syscall: file descriptor table for Native Client
15410050: syscall: in-memory file system for Native Client
15440048: all: update +build lines for Native Client port
15540045: cmd/6g, cmd/8g, cmd/gc: support for Native Client
15570045: os: support for Native Client
15680044: crypto/..., hash/crc32, reflect, sync/atomic: support for amd64p32
15690044: net: support for Native Client
15690048: runtime: support for fake time like on Go Playground
15690051: build: disable various tests on Native Client
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/68150047
Committer: Russ Cox <rsc@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update issue 6853
For an ephemeral binary - one created, run, and then deleted -
there is no need to write dwarf debug information, since the
binary will not be used with gdb. In this case, instruct the linker
not to spend time and disk space generating the debug information
by passing the -w flag to the linker.
Omitting dwarf information reduces the size of most binaries by 25%.
We may be more aggressive about this in the future.
LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/65890043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A previous CL added support for cross compiling with cgo, but
missed the GOOS check in cmd/go. Remove it.
Update issue 4714
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/57210046
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
| |
for example, we now rewrite *_Ctype_int to *C.int.
Fixes issue 6781.
LGTM=iant
R=golang-codereviews, rsc, iant
CC=golang-codereviews
https://codereview.appspot.com/36860043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
go/build is changed to list the .m files in a package, and match them for build constraints, adding them to a new field: Package.MFiles.
The go tool is changed to support building .m files and linking in the results during CGO and SWIG builds. This means packages that create a C interface to calls Objective-C code from go are now go-gettable without producing and distributing .syso files. This change is analogous to the one in Go 1.2 made to support C++ built code.
This change doesn't support .mm files (Objective C++).
Also added support for these MFiles to go list's -json mode.
Fixes issue 6536.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/60590044
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
| |
Fixes issue 7240.
LGTM=tommi.virtanen, bradfitz
R=golang-codereviews, tommi.virtanen, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/60480045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET.
CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while
CC remains for compiling for GOHOSTARCH.
CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for
GOARCH.
CGO_ENABLED defaults to disabled when cross compiling and has to be
explicitly enabled.
Update issue 4714
LGTM=minux.ma, iant
R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef
CC=golang-codereviews
https://codereview.appspot.com/57100043
Committer: Ian Lance Taylor <iant@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under some circumstances linking a test binary with gccgo can fail, because
the installed version of the library ends up before the version built for the
test on the linker command line.
This admittedly slightly hackish fix fixes this by putting the library archives
on the linker command line in the order that a pre-order depth first traversal
of the dependencies gives them, which has the side effect of always putting the
version of the library built for the test first.
Fixes issue 6768
LGTM=rsc
R=golang-codereviews, minux.ma, gobot, rsc, dave
CC=golang-codereviews
https://codereview.appspot.com/28050043
Committer: Dave Cheney <dave@cheney.net>
|
|
|
|
|
|
|
|
| |
Fixes issue 7152.
R=iant, rsc, gobot
CC=golang-codereviews
https://codereview.appspot.com/54790044
|
|
|
|
|
|
|
|
|
|
|
| |
The code is all about tags, and the cmd/go documentation
said to look in the go/build documentation for information
about tags, but the documentation said nothing about tags,
only build constraints. Make things clearer.
R=golang-dev, adg, rsc
CC=golang-dev
https://codereview.appspot.com/44100043
|