[llvm] [BOLT] Enable standalone build (PR #97130)
Rafael Auler via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 11:07:20 PDT 2024
rafaelauler wrote:
My work so far has been mainly to steer this in the direction of not breaking the normal build, but I can't verify that the actual goal (the standalone build) is working at all -- in fact, I'm not even sure why is that a thing, and why a builder that is only interested in packaging BOLT wouldn't just build it with:
```
cmake llvm-project/llvm -DLLVM_ENABLE_PROJECTS= "bolt"
```
and then
```
ninja install-bolt
```
I tried that and got a install folder with the bare minimum to run BOLT:
```
(CMAKE_INSTALL_PREFIX set to /home/rafaelauler/install/)
/home/rafaelauler/install/lib
/home/rafaelauler/install/lib/libbolt_rt_instr.a
/home/rafaelauler/install/lib/libbolt_rt_hugify.a
/home/rafaelauler/install/bin
/home/rafaelauler/install/bin/llvm-bolt
/home/rafaelauler/install/bin/perf2bolt
/home/rafaelauler/install/bin/llvm-boltdiff
/home/rafaelauler/install/bin/merge-fdata
/home/rafaelauler/install/bin/llvm-bolt-heatmap
```
So what exactly are we getting by having a standalone CMakeFile?
I also tried running cmake directly on llvm-project/bolt with this patch applied, but it fails with:
```
CMake Error at CMakeLists.txt:38 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
```
https://github.com/llvm/llvm-project/pull/97130
More information about the llvm-commits
mailing list