]> Cypherpunks repositories - gostls13.git/commit
cmd/link: fix in-package syso linking
authorShenghou Ma <minux@golang.org>
Fri, 14 Dec 2018 04:55:22 +0000 (23:55 -0500)
committerMinux Ma <minux@golang.org>
Sat, 15 Dec 2018 01:38:39 +0000 (01:38 +0000)
commit281ce28c5048416dce9379405cc061b2f3662c84
treee4c3eeb30e1b3f96ebbce3ea96f98023ddab5a41
parentfd323a8cffc11c92366243c4d26cb3ead507dc84
cmd/link: fix in-package syso linking

CL 146297 ignored archive members with short names that don't have
the .o suffix, however, it also ignored .syso files as well.
This change restores the original .syso behavior and adds a test.

As the test is basically following a shell script, we make use of
the existing cmd/go/testdata/script framework. To support running
C compiler in the script, we added a `cc` command, which runs the
C compiler along with correct platform specific arguments.

Fixes #29253.

Change-Id: If8520151c4d6a74ab9fe84d34bff9a4480688815
Reviewed-on: https://go-review.googlesource.com/c/154109
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/go/script_test.go
src/cmd/go/testdata/script/README
src/cmd/go/testdata/script/cgo_syso_issue29253.txt [new file with mode: 0644]
src/cmd/link/internal/ld/lib.go