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
Executing "CC=ccache-gcc go build" multiple times in misc/cgo/life always causes ccache to miss. This is because the build is passing absolute paths to the C compiler.
Current output of "CC=ccache-gcc go build -x": ccache-gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/_/home/.../misc/cgo/life/_obj/ -g -O2 -o $WORK/_/home/.../misc/cgo/life/_obj/_cgo_main.o -c $WORK/_/home/.../misc/cgo/life/_obj/_cgo_main.c
Those absolute paths are in temporary directories, the names of which change from run to run. We run the actual build in the package directory. I mean, I guess we could say ../../../../../../../$WORK/_/home/.../misc/cgo/life/_obj/cgo_main.c instead of $WORK//home/.../misc/cgo/life/_obj/_cgo_main.c, but does that really make sense?
If ccache works with the ../../../../ but not without, that seems like a bug in ccache.
Still confused about how this could possibly work, since $WORK is different every time the go command runs. I think this is probably not the go command's fault. Given the lack of reply, closing.
Executing
"CC=ccache-gcc go build"
multiple times in misc/cgo/life always causes ccache to miss. This is because the build is passing absolute paths to the C compiler.Current output of
"CC=ccache-gcc go build -x"
:ccache-gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/_/home/.../misc/cgo/life/_obj/ -g -O2 -o $WORK/_/home/.../misc/cgo/life/_obj/_cgo_main.o -c $WORK/_/home/.../misc/cgo/life/_obj/_cgo_main.c
Expected output of
"CC=ccache-gcc go build -x"
:ccache-gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I . -g -O2 -o _cgo_main.o -c _cgo_main.c
The text was updated successfully, but these errors were encountered: