Hi Dirk, I'm happy to just use O3 but it sounds like this isn't something doable in C++.
Maybe I should just give up RCpp and move the program entirely to C++ from now on. Best regards, Gary On Wed, May 21, 2025 at 5:50 AM Dirk Eddelbuettel <e...@debian.org> wrote: > > On 20 May 2025 at 19:39, Peiyuan Zhu wrote: > | How to use the O4 flag in an RCpp project? Every time when I load_all it > | starts using the O2 flag or the debug flag. What should I put into > Makevar? > | Can I still do remote::install.github(...)? > > Given that this mailing list can need explicit approval on eg initial > posts, > your post here precedes these two follow-ups you posted since. So by now > this > same question by you has also been asked > > - on Stackoverflow about twelve hours ago; you were told that it is not a > genuinely well-formed question (and StackOverflow can be funny that > way, I > stop interacting there for that reason). The URL is at > > https://stackoverflow.com/questions/79631329/how-to-use-o4-flag-in-rcpp-project > > - on GitHub at the Rcpp repo also about twelve hours ago, and Kevin gave > you fairly extensive feedback saying that it isn't really a Rcpp > question, > and also closed it, see https://github.com/RcppCore/Rcpp/issues/1383 > I also gave you some feedback there six hours ago, in essence the issue > is > one that has nothing to do with Rcpp and is about how R calls make to > generate the compilation, see > https://github.com/RcppCore/Rcpp/issues/1383#issuecomment-2896674848 > > The underlying issue ("how do I override compiler switches") has been > discussed elsewhere too, likely here and earlier on the (older) list > r-devel. > In short, "no we cannot remove -O2" and "no it does not matter" because > (if I > recall correctly) the right-most value wins. The documentation of `make` > probably has more. Otherwise you probably want to consult the "Writing R > Extensions" manual. > > Hope this helps. > > Dirk > > -- > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel