• Shenghou Ma's avatar
    cmd/link: fix in-package syso linking · 281ce28c
    Shenghou Ma authored
    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: default avatarCherry Zhang <cherryyz@google.com>
    Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
    281ce28c
lib.go 66.4 KB