[Bug 261807] Mk/Uses/cmake.mk: Add cmake:lto option
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Feb 11 15:04:23 GMT 2022
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261807
--- Comment #7 from Jan Beich <jbeich at FreeBSD.org> ---
(In reply to Yuri Victorovich from comment #3)
> Port option LTO can then be defined with LTO_USES=cmake:lto.
Appending arguments to an existing USES=foo is broken, see bug 199603.
(In reply to Max Brazhnikov from comment #6)
> LTO should never be an option!
See https://cgit.freebsd.org/ports/log/?qt=grep&q=LTO+by+default
LTO is similar to OPTIMIZED_CFLAGS option but slightly more fragile and
increases build time, so can get in the way with unusual toolchain
configuration or when bisecting. Blindly enabling -flto can cause crashes at
runtime e.g., https://bugs.llvm.org/show_bug.cgi?id=40635
Modern PLs like Rust enable LTO for user code as part of default optimizations,
see https://doc.rust-lang.org/rustc/codegen-options/index.html#lto
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the kde-freebsd
mailing list