Closed krlmlr closed 8 months ago
Much cleaner by editing /opt/R/devel-gcc13/lib/R/etc/Makeconf
:
LTO_OPT = -flto=10
LTO_FC_OPT = -flto=10
Then this image can be used for both LTO (with --use-LTO
) and non-LTO (without that switch) builds of R packages.
Are there any downsides?
Can be a lightweight extension of the gcc13 image. Upstream: https://www.stats.ox.ac.uk/pub/bdr/LTO/README.txt .
I made it work for myself with the following
~/.R/Makevars
:Unlike the upstream doc, I don't need
--use-LTO
forR CMD INSTALL .
to enable this. But there might be a much nicer way to configure the gcc-13 image to listen to the--use-LTO
flag?