[BOLT][CMake] Build rt library despite unreadable map_files (#77876)
Emit a warning and print a suggested workaround.
Fixes https://github.com/llvm/llvm-project/issues/77822.
diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt
index f163d45..cc3a70f 100644
--- a/bolt/CMakeLists.txt
+++ b/bolt/CMakeLists.txt
@@ -45,9 +45,9 @@
execute_process(COMMAND ls /proc/self/map_files
RESULT_VARIABLE LS OUTPUT_QUIET ERROR_QUIET)
if (LS)
- set(BOLT_ENABLE_RUNTIME OFF)
message(WARNING
- "BOLT runtime is disabled as /proc/self/map_files is unreadable.")
+ "BOLT runtime may not be able to read /proc/self/map_files. Please use
+ `--instrumentation-binpath <path-to-instrumented-binary>` option.")
endif()
endif()