• Matthew Dempsky's avatar
    cmd/compile: always write pack files · ea668e18
    Matthew Dempsky authored
    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: 's avatarIan Lance Taylor <iant@golang.org>
    ea668e18
main.go 35.5 KB