From zhengda1936 at gmail.com  Sun Oct 16 15:46:49 2016
From: zhengda1936 at gmail.com (Da Zheng)
Date: Sun, 16 Oct 2016 09:46:49 -0400
Subject: [Rd] compile c++ code in an R package without -g
Message-ID: <CAFLer81sYXPQ8rkKj3+uXd8gXTfGHkmBUqP=3feCGE2rzvFXcQ@mail.gmail.com>

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



[Rd] compile c++ code in an R package without -g
Da Zheng