aboutsummaryrefslogtreecommitdiff
path: root/test/linkx_run.go
AgeCommit message (Collapse)Author
2020-12-18test: recognize and use gc build tagIan Lance Taylor
Change the run.go driver to recognize the "gc" build tag. Change existing tests to use the "gc" build tag if they use some feature that seems specific to the gc compiler, such as passing specific options to or expecting specific behavior from "go tool compile". Change tests to use the "!gccgo" build tag if they use "go build" or "go run", as while those might work with compilers other than gc, they won't work with the way that gccgo runs its testsuite (which happens independently of the go command). For #43252 Change-Id: I666e04b6d7255a77dfc256ee304094e3a6bb15ad Reviewed-on: https://go-review.googlesource.com/c/go/+/279052 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2019-10-03cmd/compile: don't statically copy string-typed variablesMatthew Dempsky
During package initialization, the compiler tries to optimize: var A = "foo" var B = A into var A = "foo" var B = "foo" so that we can statically initialize both A and B and skip emitting dynamic initialization code to assign "B = A". However, this isn't safe in the presence of cmd/link's -X flag, which might overwrite an initialized string-typed variable at link time. In particular, if cmd/link changes A's static initialization, it won't know it also needs to change B's static initialization. To address this, this CL disables this optimization for string-typed variables. Fixes #34675. Change-Id: I1c18f3b855f6d7114aeb39f96aaaf1b452b88236 Reviewed-on: https://go-review.googlesource.com/c/go/+/198657 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-04-30all: skip unsupported tests for js/wasmRichard Musiol
The general policy for the current state of js/wasm is that it only has to support tests that are also supported by nacl. The test nilptr3.go makes assumptions about which nil checks can be removed. Since WebAssembly does not signal on reading a null pointer, all nil checks have to be explicit. Updates #18892 Change-Id: I06a687860b8d22ae26b1c391499c0f5183e4c485 Reviewed-on: https://go-review.googlesource.com/110096 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-20test: print output on link -X failureDavid Crawshaw
(Split out from CL 22205.) Change-Id: Iab66ac2a1cd3716966d8e59c570931bce95aba9b Reviewed-on: https://go-review.googlesource.com/22297 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-02-19cmd/link: remove alternate -X flag spellingRuss Cox
The Go 1.6 release notes say we'll remove the “-X name value” form (in favor of the “-X name=value” form) in Go 1.7. Do that. Also establish the doc/go1.7.txt file. Change-Id: Ie4565a6bc5dbcf155181754d8d92bfbb23c75338 Reviewed-on: https://go-review.googlesource.com/19614 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-06-29cmd/link: detect -X setting non-string variableRuss Cox
Fixes #9621. Change-Id: Ib9c6001378364af899f57fd4b89fb23af2042923 Reviewed-on: https://go-review.googlesource.com/11694 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
2015-06-05cmd/link: deprecate -X name value in favor of -X name=valueRuss Cox
People invoking the linker directly already have to change their scripts to use the new "go tool link", so this is a good time to make the -X flag behave like all other Go flags and take just a single argument. The old syntax will continue to be accepted (it is rewritten into the new syntax before flag parsing). Maybe some day we will be able to retire it. Even if we never retire the old syntax, having the new syntax at least makes the rewriting much less of a kludge. Change-Id: I91e8df94f4c22b2186e81d7f1016b8767d777eac Reviewed-on: https://go-review.googlesource.com/10310 Reviewed-by: Rob Pike <r@golang.org>
2015-01-02cmd/go: put user ldflags at the end of the linker invocationJosh Bleecher Snyder
If the user provided a key but no value via -ldflag -X, another linker flag was used as the value. Placing the user's flags at the end avoids this problem. It also provides the user the opportunity to override existing linker flags. Fixes #8810. Change-Id: I96f4190713dc9a9c29142e56658446fba7fb6bc8 Reviewed-on: https://go-review.googlesource.com/2242 Reviewed-by: Minux Ma <minux@golang.org>
2014-12-18test: add missing linkx testJosh Bleecher Snyder
This test was added in CL 151000043. It got lost in CL 144630044. Change-Id: I318ab11be8e3e7489fc1395457c029c8bdb2aa41 Reviewed-on: https://go-review.googlesource.com/1773 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-11-09test: fix nacl buildRuss Cox
Disable linkx_run.go and sinit_run.go, because they exec subprocesses, which NaCl cannot. TBR=r CC=golang-codereviews https://golang.org/cl/171350043
2014-11-06test: move linkx and sinit to run.goJosh Bleecher Snyder
The remaining run-only tests will be migrated to run.go in another CL. This CL will break the build due to issues 8746 and 8806. Update #4139 Update #8746 Update #8806 LGTM=rsc R=rsc, bradfitz, iant CC=golang-codereviews https://golang.org/cl/144630044