-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building with USECCACHE=1. #8906
Conversation
Have you tried a build from scratch with these set? I'm almost positive it'll fail at building libgit, since cmake is picky about not having flags in the compiler names. According to http://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmake we probably want to use one of the ccache symlinks in |
You're right, I only tested a make after The problem with the Maybe checking if |
Would you prefer something like: ifeq ($(USECCACHE), 1)
-CC := ccache $(CC)
-CXX := ccache $(CXX)
+CC_BASE := $(JULIAHOME)/ccache/$(CC)
+CXX_BASE := $(JULIAHOME)/ccache/$(CXX)
+$(shell mkdir -p $(JULIAHOME)/ccache)
+$(shell ln -sf `which ccache` $(CC_BASE))
+$(shell ln -sf `which ccache` $(CXX_BASE))
+CC = $(CC_BASE)
+CXX = $(CXX_BASE) Seems terribly fragile though, for example when using a non-trivial |
Did For making our own symlinks, anything you can get to work after a |
Okay, I pushed my second take on this, this time using I haven't tested the |
Why doesn't this build? The Linux bot doesn't seem to list an error, and the Mac error doesn't really ring a bell... |
This fixes the variable expansion and building with CMake.
Rebased on top of master, and Travis seems all-right now. Except for the Mac bot, but that seems like a failing |
This looks good enough to me. I even installed ccache and it seems to have worked fine. Thanks for fixing it. |
Mostly scratching my own itches :) Thanks for merging. |
After 6300cbe, building with
USECCACHE=1
was broken due to the alterations toCC
andCXX
, causing$(BINARY)
to expand badly and ending up with-m
rather than-m64
in the compilation command.This fixes it, although to be honest I'm not completely sure about this. Maybe some
Make
guru can comment on whether this is the proper way to prependccache
to the recursively expandingCC
andCXX
variables.