Skip to content

Commit

Permalink
[BOLT][CMake] Build rt library despite unreadable map_files (llvm#77876)
Browse files Browse the repository at this point in the history
Emit a warning and print a suggested workaround.

Fixes llvm#77822.
  • Loading branch information
aaupov authored Mar 20, 2024
1 parent a7d5f73 commit 1918d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bolt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 1918d4b

Please sign in to comment.