[R-pkg-devel] Changing optimization level when building package?

Tomas Kalibera tom@@@k@||ber@ @end|ng |rom gm@||@com
Thu Jul 7 09:41:20 CEST 2022


On 7/5/22 16:11, Ivan Krylov wrote:
> On Tue, 5 Jul 2022 09:35:05 -0400
> Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>
>> I see the -O0 option that I added, but afterwards -O2 coming from
>> somewhere in R.
> It seems to come from the CXXFLAGS macro defined in /etc/R/Makeconf.
> It's the last to be added to ALL_CXXFLAGS, so you probably have to
> overwrite it in ~/.R/Makevars.
>
Yes. I set both CFLAGS and CXXFLAGS in my Makevars_dbg0 file and let R 
use it via R_MAKEVARS_USER.
See R-Admin, 6.3.3, Customizing package compilation, for more.

Tomas



More information about the R-package-devel mailing list