[Rd] compile c++ code in an R package without -g
Da Zheng
zhengda1936 at gmail.com
Sun Oct 16 15:46:49 CEST 2016
Hello,
I'm writing an R package that is mainly written in C++. By default, R
CMD INSTALL creates C/C++ flags as follows:
-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -g
However, my package is fairly large. With debug info compiled into the
library, the generated .so file is over 200MB. Without debug info,
it's about 30MB. I hope by default debug info is disabled. However, I
don't see any option in R CMD INSTALL that can disable "-g". Could
anyone tell me how to disable it?
Many thanks,
Da
More information about the R-devel
mailing list