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)
23
23
set (support_plugins SUPPORT_PLUGINS)
24
24
endif ()
25
25
26
+ set (CLANG_BOLT_ALLOWLIST INSTRUMENT PERF LBR)
26
27
set (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 \
28
29
mechanism." )
29
30
string (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 ()
30
34
31
35
if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED)
32
36
set (CLANG_BOLT_DEPS clear-bolt-fdata llvm-bolt llvm-readobj)
You can’t perform that action at this time.
0 commit comments