You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[~/myprogs/test 1]$ ls
main.go
[~/myprogs/test 1]$ cat main.go
package main
import "fmt"
func main() {
fmt.Println("hello!")
}
[~/myprogs/test 1]$ go build -asmflags="all=-trimpath=`pwd`"
What did you expect to see?
Successful build with given path references removed.
What did you see instead?
[~/myprogs/test 1]$ go build -asmflags="all=-trimpath=`pwd`"
# runtime/internal/atomic
usage: asm [options] file.s ...
Flags:
-D value
predefined symbol with optional simple value -D=identifier=value; can be set multiple times
-I value
include directory; can be set multiple times
-S print assembly and machine code
-V print version and exit
-debug
dump instructions as they are parsed
-dynlink
support references to Go symbols defined in other shared libraries
-e no limit on number of errors reported
-gensymabis
write symbol ABI information to output file, don't assemble
-newobj
use new object file format
-o string
output file; default foo.o for /a/b/c/foo.s as first argument
-shared
generate code that can be linked into a shared library
-trimpath string
remove prefix from recorded source file paths
# internal/cpu
usage: asm [options] file.s ...
Flags:
-D value
predefined symbol with optional simple value -D=identifier=value; can be set multiple times
-I value
include directory; can be set multiple times
-S print assembly and machine code
-V print version and exit
-debug
dump instructions as they are parsed
-dynlink
support references to Go symbols defined in other shared libraries
-e no limit on number of errors reported
-gensymabis
write symbol ABI information to output file, don't assemble
-newobj
use new object file format
-o string
output file; default foo.o for /a/b/c/foo.s as first argument
-shared
generate code that can be linked into a shared library
-trimpath string
remove prefix from recorded source file paths
# sync/atomic
usage: asm [options] file.s ...
Flags:
-D value
predefined symbol with optional simple value -D=identifier=value; can be set multiple times
-I value
include directory; can be set multiple times
-S print assembly and machine code
-V print version and exit
-debug
dump instructions as they are parsed
-dynlink
support references to Go symbols defined in other shared libraries
-e no limit on number of errors reported
-gensymabis
write symbol ABI information to output file, don't assemble
-newobj
use new object file format
-o string
output file; default foo.o for /a/b/c/foo.s as first argument
-shared
generate code that can be linked into a shared library
-trimpath string
remove prefix from recorded source file paths
The text was updated successfully, but these errors were encountered:
Yeah @toothrot that works! 👍
I find it to be a little odd syntax and none of the documentation mentions that? Should we add?
toothrot
changed the title
asmflags: trimpath doesn't work for paths with spaces in them
cmd/go: provide example documentation for trimpath arguments with spaces
Mar 13, 2020
@siddharth178 This is part of how Unix shells interpret quoted arguments, and not part of Go, so I would lean against providing specific documentation for that.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. It is also reproducible on linux amd64.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Successful build with given path references removed.
What did you see instead?
The text was updated successfully, but these errors were encountered: