Skip to content

cmd/compile: should support multiple trimpath arguments and/or splitter in the GOPATH #22382

@polomsky

Description

@polomsky

What version of Go are you using (go version)?

go 1.9.1

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

does not matter (linux, windows)

What did you do?

When I run go build -gcflags -trimpath somepath go will execute go tool compile -trimpath $WORK -trimpath somepath during build process. Due to this default -trimpath $WORK is not effective.

Another use case is go build -gcflags -trimpath $GOPATH because I want to prevent storing my username (from the homedir) to built binaries and I have more directories in the GOPATH.

What did you expect to see?

all trimpath arguments are used

What did you see instead?

last trimpath argument is used

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions