Hello LLVM, When building LLVM/Clang (debug build), linking takes too long. I notice that LTO is enabled now and guess that's to blame. Is there a CMAKE config option to disable LTO linking? I can't seem to find anything. Thanks, -steve
Hi, There is no option (that I know of) to enable/disable LTO (it shouldn’t be enabled) other than setting it explicitly in the CMAKE_C_FLAG/CMAKE_CXX_FLAG. Are you sure LTO is enabled? What it the value of CMAKE_C_FLAG/CMAKE_CXX_FLAG in your CMakeCache.txt? — Mehdi> On Jan 13, 2016, at 11:20 AM, Steve King via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello LLVM, > When building LLVM/Clang (debug build), linking takes too long. I > notice that LTO is enabled now and guess that's to blame. Is there a > CMAKE config option to disable LTO linking? I can't seem to find > anything. > > Thanks, > -steve > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
On Wed, Jan 13, 2016 at 11:26 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:> Are you sure LTO is enabled? What it the value of CMAKE_C_FLAG/CMAKE_CXX_FLAG in your CMakeCache.txt?Thanks Mehdi, I think I'm mistaken about LTO. During linking, my gcc 5.3 loads liblto_plugin.so and lto_wrapper and so on, but I don't see the -flto option to actually enable it. Must be something else clogging my build.
Duncan P. N. Exon Smith via llvm-dev
2016-Jan-25 17:19 UTC
[llvm-dev] CMake option to disable LTO?
I think it'd be a bug if you got LTO by default with a debug build. What platform are you on? What cmake command did you use when configuring?> On 2016-Jan-13, at 11:20, Steve King via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello LLVM, > When building LLVM/Clang (debug build), linking takes too long. I > notice that LTO is enabled now and guess that's to blame. Is there a > CMAKE config option to disable LTO linking? I can't seem to find > anything. > > Thanks, > -steve > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Rafael Espíndola via llvm-dev
2016-Jan-26 12:42 UTC
[llvm-dev] CMake option to disable LTO?
On 25 January 2016 at 09:19, Duncan P. N. Exon Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I think it'd be a bug if you got LTO by default with a debug build. > What platform are you on? What cmake command did you use when > configuring?It is probably just an oddity of building with current gcc: -------------------------------- gcc test.o -o test.so -shared -Wl,-debug ..... usr/bin/ld -plugin /usr/libexec/gcc/x86_64-redhat-linux/5.3.1/liblto_plugin.so... ---------------------------- It always passes the plugin options to ld, even when not doing LTO. Cheers, Rafael