File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,14 @@ if(CLANG_PLUGIN_SUPPORT)
2323  set (support_plugins SUPPORT_PLUGINS)
2424endif ()
2525
26+ set (CLANG_BOLT_ALLOWLIST INSTRUMENT PERF LBR)
2627set (CLANG_BOLT OFF  CACHE  STRING  "Apply BOLT optimization to Clang. \  
27-    May be specified as Instrument or Perf or LBR  to use a particular profiling \ 
28+ May be specified as one of  ${CLANG_BOLT_ALLOWLIST}  to use a particular profiling \  
2829  mechanism." )
2930string (TOUPPER "${CLANG_BOLT} "  CLANG_BOLT)
31+ if  (CLANG_BOLT AND  NOT  CLANG_BOLT IN_LIST  CLANG_BOLT_ALLOWLIST)
32+     message (FATAL_ERROR "Specified CLANG_BOLT value '${CLANG_BOLT} ' is not one of ${CLANG_BOLT_ALLOWLIST} ." )
33+ endif ()
3034
3135if  (CLANG_BOLT AND  NOT  LLVM_BUILD_INSTRUMENTED)
3236  set (CLANG_BOLT_DEPS clear-bolt-fdata llvm-bolt llvm-readobj)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments