[PATCH] D45558: [test-suite] Save stats for LTO step too.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 4 10:55:56 PDT 2018


fhahn added inline comments.


================
Comment at: test-suite/trunk/CMakeLists.txt:198
+  # Collect stats for LTO step too.
+  if (${CMAKE_C_FLAGS} MATCHES ".*-flto.*" AND
+      ${CMAKE_CXX_FLAGS} MATCHES ".*-flto.*")
----------------
MatzeB wrote:
> fhahn wrote:
> > MatzeB wrote:
> > > You could just append the flag to LDFLAHS unconditionally now, can you? (Or do nothing at all, I think currently we append cflags to all linker invocations too; which admittedly is bad style but unlikely to change...
> > Ah I saw your comment too late, sorry! I think the main reason I originally added it conditionally is to avoid "unused argument" warnings when not doing LTO. What do you think?
> I only added the comments after you committed so no worries. But I still think that adding all this after you did the changes for working without `-Wl,plugin` are not necessary anymore, maybe try removing them and if things still work remove this?
I just tried, unconditionally adding `-save-stats` to the LDFLAGS works. But for non-lto builds, it produces `argument unused during compilation` warnings for each linker invocation. IMO it would be slightly better to only add it for LTO, to avoid those warnings in the non-LTO case for now. 


Repository:
  rL LLVM

https://reviews.llvm.org/D45558





More information about the llvm-commits mailing list