Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disables link-time optimization unless -DENABLE_LTO=ON is passed. #3524

Merged
merged 1 commit into from
Jan 6, 2017

Commits on Jan 5, 2017

  1. Disables link-time optimization unless -DENABLE_LTO=ON is passed.

    This disables the `-flto` LTO flag by default since we're seeing
    segfaults in compiler lto plugins, binutils and linker errors again and
    again for various clang / gcc / binutils combinations.
    
    Pass `-DNEBALE_LTO` to `cmake` in order to re-enable LTO.
    
    LTO situation in short:
    - LTO does not work at all for gcc<4.9
    - With gcc>=4.9 the "slim" LTO format is getting used dumping IR
    - Older binutils need LTO plugins which know how to read this IR
    - Recent binutils handle this format all by themselves
    - LLVM is more or less the same with some Clang versions segfaulting
    
    If you need the performance benefit of LTO, make sure your compiler and
    binutils are up to date and see for yourself if LTO builds work for you.
    
    References:
    - https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ
    - #3481 (comment)
    - #3501
    - #3441
    
    (and a ton of other LTO tickets if you search for them)
    daniel-j-h committed Jan 5, 2017
    Configuration menu
    Copy the full SHA
    e78b58f View commit details
    Browse the repository at this point in the history