Last active
October 8, 2022 17:19
-
-
Save gaborcsardi/04e1ed3c74dc391914409c546d9d53ef to your computer and use it in GitHub Desktop.
Dockerfile for R-devel with clang 15 and libc++-15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM tuxmake/clang-15 | |
RUN apt-get update -y ; apt-get install -y curl | |
RUN curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-latest.tar.gz | tar xz -C /usr/local | |
RUN rig add devel | |
RUN mkdir ~/.R | |
RUN apt-get install -y libc++abi-15-dev libc++-15-dev | |
RUN printf 'CC = clang\nCXX = clang++ -stdlib=libc++\nCXX11 = clang++ -stdlib=libc++\nCXX14 = clang++ -stdlib=libc++\nCXX17 = clang++ -stdlib=libc++\nCXX20 = clang++ -stdlib=libc++\n' > ~/.R/Makevars | |
RUN flags="-O2 -g -Wunneeded-internal-declaration -Winvalid-utf8 -Wformat -Wsizeof-pointer-div -Wliteral-conversion -Wempty-body -Wreturn-stack-address -Wnon-c-typedef-for-linkage -Wstrict-prototypes"; \ | |
echo "CFLAGS=$flags" >> ~/.R/Makevars; \ | |
echo "CXXFLAGS=$flags" >> ~/.R/Makevars; \ | |
echo "CXX11FLAGS=$flags" >> ~/.R/Makevars; \ | |
echo "CXX14FLAGS=$flags" >> ~/.R/Makevars; \ | |
echo "CXX17FLAGS=$flags" >> ~/.R/Makevars; \ | |
echo "CXX20FLAGS=$flags" >> ~/.R/Makevars | |
RUN apt-get install -y git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment