Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile R package with clang in ubuntu

Tags:

c++

c

r

makefile

Currently I am using ubuntu.

By default R uses g++ to compile c/c++ code in a R package.

How can I force R to use clang++/clang?

like image 579
user1436187 Avatar asked Oct 24 '25 05:10

user1436187


1 Answers

http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-August/004208.html

i) clang -- and I do from time to time test with clang which works just fine "as is", ie on my Linux box I simply say this in ~/.R/Makevars

CXX=clang++
CC=clang

Thanks Dirk!

like image 198
user1436187 Avatar answered Oct 26 '25 18:10

user1436187



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!