• Russ Cox's avatar
    cmd/internal/objabi: expand -trimpath syntax · 4891a3b6
    Russ Cox authored
    This CL affects the low-level -trimpath flag provided
    by both cmd/asm and cmd/compile. Previously, the flag
    took the name of a single directory that would be trimmed
    from recorded paths in the resulting object file.
    This CL makes the flag take a semicolon-separated list of paths.
    Further, each path can now end in an optional "=>replacement"
    to specify what to replace that leading path prefix with,
    instead of only dropping it.
    
    A followup CL will add a mode to cmd/go that uses this
    richer -trimpath to build binaries that do not contain any
    local path names.
    
    For #16860.
    
    Change-Id: I246811750f37607c7f7a8fbecd56c5475ebe1ea5
    Reviewed-on: https://go-review.googlesource.com/c/go/+/173344
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
    4891a3b6
line.go 2.96 KB