[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)
    Petr Hosek via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Nov  6 00:59:16 PST 2023
    
    
  
================
@@ -850,23 +850,38 @@ if (CLANG_ENABLE_BOOTSTRAP)
   endforeach()
 endif()
 
-if (CLANG_BOLT_INSTRUMENT AND NOT LLVM_BUILD_INSTRUMENTED)
+set(CLANG_BOLT "INSTRUMENT" CACHE STRING "Apply BOLT optimization to Clang. \
+  May be specified as Instrument or Perf or LBR to use a particular profiling \
+  mechanism.")
+string(TOUPPER "${CLANG_BOLT}" uppercase_CLANG_BOLT)
----------------
petrhosek wrote:
This is a super minor nit, but you can reuse the same variable (it wouldn't actually change the cached value, the non-cached variable is going to shadow the cached one which is fine in this case).
https://github.com/llvm/llvm-project/pull/69133
    
    
More information about the cfe-commits
mailing list