Getting rid of debug flags in devtools::load_all

I am developing an R package containing C++ code via Rcpp. Devtools is very convenient, but always adds debug flags -g -O0 when running load_all. This is added after my specification of -O3 in ~/.R/Makevars.

I see in the devtools documentation "Debugging flags for the compiler, set by compiler_flags(FALSE)." However, this function does not seem to be exported in devtools. I tried calling the function pkgbuild::compiler_flag(FALSE), but this did not remove the flags when running load_all again, although it did seem to output the correct flags.

Can someone help?

See pkg.build_extra_flags here:

1 Like

Worked like a charm, thanks! Was not clear to me that these are determined by global options.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.