]> Cypherpunks repositories - gostls13.git/commit
cmd/pack: treat compiler's -linkobj output as "compiler object"
authorCherry Zhang <cherryyz@google.com>
Mon, 21 Dec 2020 19:11:02 +0000 (14:11 -0500)
committerCherry Zhang <cherryyz@google.com>
Tue, 22 Dec 2020 15:50:18 +0000 (15:50 +0000)
commit9b6147120a30a8bc30a41c1651f369e8bcb80948
tree895e20fcf43799680add3442ccf9a2cfafb22692
parentbc7e4d9257693413d57ad467814ab71f1585a155
cmd/pack: treat compiler's -linkobj output as "compiler object"

Treat the compiler's -linkobj output as "compiler object, which
means "pack c" will "see through" the file and add individual
entry to the new archive, instead of the object as a whole.

This is somewhat peculiar. But Go 1.15's cmd/pack does this,
although seemingly accidental. We just do the same. FWIW, it
does make things more consistent with/without -linkobj flag.

Fixes #43271.

Change-Id: I6b2d99256db7ebf0fa430f85afa7464e334f6bcb
Reviewed-on: https://go-review.googlesource.com/c/go/+/279483
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/pack/pack.go
src/cmd/pack/pack_test.go