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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 01:35:05 PDT 2018


fhahn created this revision.
fhahn added reviewers: MatzeB, rengolin, kristof.beyls.
Herald added subscribers: inglorion, mehdi_amini, mgorny.

Currently we do not generate stats for the LTO step. This change
together with https://reviews.llvm.org/D45531 allows us to gather stats for the LTO step too.


https://reviews.llvm.org/D45558

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -194,6 +194,11 @@
 if(TEST_SUITE_COLLECT_STATS)
   list(APPEND CFLAGS -save-stats=obj)
   list(APPEND CXXFLAGS -save-stats=obj)
+  # Collect stats for LTO step too.
+  if (${CMAKE_C_FLAGS} MATCHES ".*-flto.*" AND
+      ${CMAKE_CXX_FLAGS} MATCHES ".*-flto.*")
+    list(APPEND LDFLAGS -Wl,-plugin-opt='-save-stats=obj')
+  endif()
 endif()
 
 # Detect and include subdirectories


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45558.142128.patch
Type: text/x-patch
Size: 510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/12167de4/attachment.bin>


More information about the llvm-commits mailing list