Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd ccache #143
Add ccache #143
Comments
You are confusing mingw-packages with msys-packages. The latter are only used for the msys build environment itself, they are not useful for building native windows software like R. You probably want to port this one: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-ccache |
|
I successfully ported the mingw package you pointed to, happy to submit a PR. The package gets installed in |
|
If you build with |
|
Confirmed, I need to run Will report with what is needed to enable |
|
I have now successfully taught What's the best way to instruct R to use An alternative way of running |
|
You can override
Or from R: dir.create("~/.R")
writeLines("CC=$(BINPREF)ccache $(BINPREF)gcc", "~/.R/Makevars")
writeLines("CXX=$(BINPREF)ccache $(BINPREF)g++", "~/.R/Makevars")
writeLines("CXX11=$(BINPREF)ccache $(BINPREF)g++", "~/.R/Makevars")
writeLines("CXX14=$(BINPREF)ccache $(BINPREF)g++", "~/.R/Makevars")
writeLines("CXX17=$(BINPREF)ccache $(BINPREF)g++", "~/.R/Makevars") |
|
Thanks. Achieving great results with the following combo: dir.create("~/.R")
vars <- c("CC", "CXX", "CXX11", "CXX14", "CXX17")
code <- paste0(vars, " := $(BINPREF)ccache $(", vars, ")")
writeLines(code, "~/.R/Makevars")
writeLines(
c(
'PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"',
paste0('MAKEFLAGS="-O -j', parallel::detectCores() + 1, '"')
),
con = "~/.Renviron"
)PR follows. |
|
Can't install ccache on a fresh rtools40 install. |
|
I haven't synced to CRAN yet. If you want to install now, edit the files |
|
When do you plan to sync next? |
for regular compiles and for building packages.
{mingw32,mingw64}/{bin,lib}; installing viapacman -Uputs it into/usr/{bin,lib},makepkg-mingwdoesn't seem to pick it up from theremakepkg*.confsed "/^BUILDENV/ s/!ccache/ccache/"/usr/lib/ccache/binto$PATHccache(setCCACHE_DISABLEenvironment var)Would you support that? How can I help?