aboutsummaryrefslogtreecommitdiff
path: root/test/run.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2018-10-22 11:21:56 -0400
committerAustin Clements <austin@google.com>2018-11-12 20:46:41 +0000
commit0f5dfbcfd789c2217f40dc59d1882149a8502960 (patch)
tree34f380d809292848a26ca9ba4c6241d3b2862f7a /test/run.go
parent7f1dd3ae4df08a8619311c95f3e4c91b96132efd (diff)
downloadgo-0f5dfbcfd789c2217f40dc59d1882149a8502960.tar.gz
go-0f5dfbcfd789c2217f40dc59d1882149a8502960.zip
cmd/go, cmd/dist: plumb symabis from assembler to compiler
For #27539. Change-Id: I0e27f142224e820205fb0e65ad03be7eba93da14 Reviewed-on: https://go-review.googlesource.com/c/146999 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'test/run.go')
-rw-r--r--test/run.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/run.go b/test/run.go
index 6a050b0049..a01fd6a957 100644
--- a/test/run.go
+++ b/test/run.go
@@ -807,10 +807,23 @@ func (t *test) run() {
}
}
+ if len(asms) > 0 {
+ if err := ioutil.WriteFile(filepath.Join(longdir, "go_asm.h"), nil, 0666); err != nil {
+ t.err = fmt.Errorf("write empty go_asm.h: %s", err)
+ return
+ }
+ cmd := []string{goTool(), "tool", "asm", "-symabis", "-o", "symabis"}
+ cmd = append(cmd, asms...)
+ _, err = runcmd(cmd...)
+ if err != nil {
+ t.err = err
+ break
+ }
+ }
var objs []string
cmd := []string{goTool(), "tool", "compile", "-e", "-D", ".", "-I", ".", "-o", "go.o"}
if len(asms) > 0 {
- cmd = append(cmd, "-asmhdr", "go_asm.h")
+ cmd = append(cmd, "-asmhdr", "go_asm.h", "-symabis", "symabis")
}
cmd = append(cmd, gos...)
_, err := runcmd(cmd...)