]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: always write pack files
authorMatthew Dempsky <mdempsky@google.com>
Thu, 22 Mar 2018 20:51:13 +0000 (13:51 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 24 Mar 2018 00:51:24 +0000 (00:51 +0000)
commitea668e18a6ee48c46fb585265086a908ef7768a1
tree43f9e92bf3c8d15eda1e6e921e54c629924ae945
parent699b0d4e52f32234e21358d3a0b9485b01c13236
cmd/compile: always write pack files

By always writing out pack files, the object file format can be
simplified somewhat. In particular, the export data format will no
longer require escaping, because the pack file provides appropriate
framing.

This CL does not affect build systems that use -pack, which includes
all major Go build systems (cmd/go, gb, bazel).

Also, existing package import logic already distinguishes pack/object
files based on file contents rather than file extension.

The only exception is cmd/pack, which specially handled object files
created by cmd/compile when used with the 'c' mode. This mode is
extended to now recognize the pack files produced by cmd/compile and
handle them as before.

Passes toolstash-check.

Updates #21705.
Updates #24512.

Change-Id: Idf131013bfebd73a5cde7e087eb19964503a9422
Reviewed-on: https://go-review.googlesource.com/102236
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/obj.go
src/cmd/pack/pack.go