wanghenshui commented on code in PR #764:
URL: https://github.com/apache/incubator-kvrocks/pull/764#discussion_r936357187


##########
CMakeLists.txt:
##########
@@ -60,6 +62,35 @@ endif()
 
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
+if(ENABLE_IPO)
+    include(CheckIPOSupported)
+    check_ipo_supported(RESULT result OUTPUT output LANGUAGES CXX)
+    if(result)
+        message(STATUS "IPO / LTO enabled")
+       set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)    
+       set(NJOBS 2)

Review Comment:
   > I prefer `-lfto=auto`, it is more complicated for user to specify a job 
number in `ENABLE_IPO`.
   
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to