[llvm] [BOLT] Enable standalone build (PR #97130)
Rafael Auler via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 18:02:38 PDT 2024
================
@@ -92,10 +92,22 @@
tool_dirs = [config.llvm_tools_dir, config.test_source_root]
+llvm_bolt_args = []
+
+if config.libbolt_rt_instr:
+ llvm_bolt_args.append(f"--runtime-instrumentation-lib={config.libbolt_rt_instr}")
----------------
rafaelauler wrote:
In --runtime-instrumentation-lib description, it says:
"specify file name of the runtime instrumentation library"
But here we provide a full path to the library. It should fail to work, as #99806 implies.
However, the reason it succeeds (at least on my system) is because we're adding here the getLibPathByInstalled() function that is currently broken, CMAKE_INSTALL_LIBDIR resolves to a single folder name (lib64), that then gets converted into an empty string via the call to root_path, and then we finally append the contents of --runtime-instrumentation-lib, which succeeds to find the file because it is already a full path.
I think if the intent is to use --runtime-instrumentation-lib as a flag that contains the full path, we should at least update the description of that and properly support it in getLibPath() (instead of having it work by chance).
https://github.com/llvm/llvm-project/pull/97130
More information about the llvm-commits
mailing list