gcc - Using -flto with autotools -


given c++ program uses gnu autotools, what's easiest way compile -flto (link time optimization)? understanding is customary on unix such optimization flags specified user or packager, not programmer.

according this post, -flto flag needs passed compilation flag , linker flag, so:

./configure cxxflags="-flto" ldflags="-flto" ... 

or possibly:

./configure cxxflags="-flto" ldflags="-wc,-flto" ... 

might work.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -