[llvm] [BOLT][CMake] Build rt library despite unreadable map_files (PR #77876)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 15:04:03 PDT 2024


https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/77876

>From 2b50f841995d19098e76e90e3c0eecee1de683de Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Thu, 11 Jan 2024 21:59:11 -0800
Subject: [PATCH] [BOLT][CMake] Build rt library despite unreadable map_files

Emit a warning and print a suggested workaround.
---
 bolt/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt
index f163d45342874d..cc3a70fa35e0ab 100644
--- a/bolt/CMakeLists.txt
+++ b/bolt/CMakeLists.txt
@@ -45,9 +45,9 @@ if (BOLT_ENABLE_RUNTIME)
   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()
 



More information about the llvm-commits mailing list