We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1b7037 commit 29b7295Copy full SHA for 29b7295
clang/tools/driver/CMakeLists.txt
@@ -23,10 +23,14 @@ if(CLANG_PLUGIN_SUPPORT)
23
set(support_plugins SUPPORT_PLUGINS)
24
endif()
25
26
+set(CLANG_BOLT_ALLOWLIST INSTRUMENT PERF LBR)
27
set(CLANG_BOLT OFF CACHE STRING "Apply BOLT optimization to Clang. \
- 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 \
29
mechanism.")
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()
34
35
if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED)
36
set(CLANG_BOLT_DEPS clear-bolt-fdata llvm-bolt llvm-readobj)
0 commit comments