@@ -1206,6 +1206,23 @@ helps within this environment as it installs the corresponding
12061206systems is provided
12071207[ at this page] ( https://conda.io/docs/user-guide/tasks/build-packages/compiler-tools.html ) .
12081208
1209+ ## Can I speed up compilation?
1210+
1211+ Somewhat. One option is to cache as much as possible via
1212+ [ ccache] ( https://ccache.dev/ ) by adding it to ` ~/.R/Makevars ` .
1213+
1214+ Depending on what parts of Rcpp are being used, compilation speed can be
1215+ increased by turning use of Modules off. Starting with version 1.0.3, the
1216+ ` RCPP_NO_MODULES ` define can be used. It can be set in ` src/Makevars ` as
1217+ an argument to ` PKG_CXXFLAGS ` (or one of the other C++ dialect options) as
1218+ ` -DRCPP_NO_MODULES ` . This has the advantage of affecting _ all_ files in the
1219+ package, including the auto-generated ` RcppExports.cpp ` where it might be
1220+ trickier to set it manually.
1221+
1222+ Beyond modules, RTTI support can also be turned off. this implies turning
1223+ Modules support off as well so. To select this approach, use the
1224+ ` RCPP_NO_RTTI ` define.
1225+
12091226# Support
12101227
12111228## Is the API documented
@@ -1720,3 +1737,11 @@ elsewhere.
17201737So if your autogenerated file fails, and a ` symbols not found ` error is reported
17211738by the linker, consider running ` compileAttributes() ` twice. Deleting
17221739` R/RcppExports.R ` and ` src/RcppExports.cpp ` may also work.
1740+
1741+ ## Can we use exceptions and stop() across shared libraries?
1742+
1743+ No, sadly. A known limitation coming from the operating system, Windows in
1744+ particular. Exceptions cannot be caught safely as R is statically linked
1745+ with ` libgcc ` there. Some more background is [ in this SO
1746+ question] ( https://stackoverflow.com/questions/2424836/exceptions-are-not-caught-in-gcc-program ) .
1747+
0 commit comments