Skip to content

Conversation

@serge-sans-paille
Copy link
Collaborator

This avoids failing later in the build process.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 11, 2025

@llvm/pr-subscribers-clang

Author: None (serge-sans-paille)

Changes

This avoids failing later in the build process.


Full diff: https://github.com/llvm/llvm-project/pull/126768.diff

1 Files Affected:

  • (modified) clang/tools/driver/CMakeLists.txt (+5-1)
diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt
index ad336fcc45b60..40c0a622976e1 100644
--- a/clang/tools/driver/CMakeLists.txt
+++ b/clang/tools/driver/CMakeLists.txt
@@ -23,10 +23,14 @@ if(CLANG_PLUGIN_SUPPORT)
   set(support_plugins SUPPORT_PLUGINS)
 endif()
 
+set(CLANG_BOLT_ALLOWLIST INSTRUMENT PERF LBR)
 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 \
+May be specified as one of ${CLANG_BOLT_ALLOWLIST} to use a particular profiling \
   mechanism.")
 string(TOUPPER "${CLANG_BOLT}" CLANG_BOLT)
+if (NOT CLANG_BOLT IN_LIST CLANG_BOLT_ALLOWLIST)
+    message(FATAL_ERROR "Specified CLANG_BOLT value '${CLANG_BOLT}' is not one of ${CLANG_BOLT_ALLOWLIST}.")
+endif()
 
 if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED)
   set(CLANG_BOLT_DEPS clear-bolt-fdata llvm-bolt llvm-readobj)

This avoids failing later in the build process.
@serge-sans-paille
Copy link
Collaborator Author

Thanks (and hi o/)

@serge-sans-paille serge-sans-paille merged commit 29b7295 into llvm:main Feb 14, 2025
8 checks passed
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
This avoids failing later in the build process.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
This avoids failing later in the build process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants