Reputation: 49
I am trying understand what "go build" does and so I enabled verbose flag
go build -x -v -a hello.go
For some packages I see that package path option has absolute directory name preceded by an '_'
compile -o $WORK/b002/pkg.a -trimpath "$WORK/b002=>" -p _/users/someuser/Temp/HelloMe -complete -goversion go1.14.2 -D _/users/someuser/Temp/HelloMe -importcfg $WORK/b002/importcfg -pack -c=4 ./HelloMe.go
In what cases does the build chain use such package path name and is there a way to specify something different?
Upvotes: 0
Views: 193
Reputation: 42433
In what cases does the build chain use such package path name [...]
On Windows.
and is there a way to specify something different?
No. (It doesn't matter anyway.)
Upvotes: -1
Reputation: 2238
If you're trying to understand the whole go build process there's an excellent post on Maori Geek laying out a lot of the details. I believe you might be misinterpreting some of the arguments getting passed to the internal tools, but that post should help clear things up.
Upvotes: 2