[llvm] [BOLT] Enable standalone build (PR #97130)

Tristan Ross via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 18:04:58 PDT 2024


RossComputerGuy wrote:

> Looks good in general, but please put specific changes into the summary and add the test plan. I assume you've tested this in Nix, but we need instructions for general use.

Haven't had a chance to test it yet. Only a rebase from the previous author of the PR (#87196). Instructions and stuff remain the same as the previous attempt hence me mentioning it.

>From the previous PR:
> Upstream changes from [NixOS/nixpkgs#289587](https://github.com/NixOS/nixpkgs/pull/289587), this enables standalone build for BOLT, which makes packaging easier. Most of the changes in `bolt/CMakeLists.txt` are copied from `clang/CMakeLists.txt`. `bolt/lib/Target/*/CMakeLists.txt` is also modified to compile tablegen instead of relying on files in `LLVM_BINARY_DIR`. `bolt/lib/Utils/CMakeLists.txt` is changed to generate the VCS information by itself instead of relying on `llvm_vcsrevision_h`, which is not available for the standalone build. These changes should not affect existing builds, but will enable standalone build.
> 
> `llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h` is changed to remove an (apparently) unused `config.h` include which prevents the standalone build from working, so far I don't encounter any compilation issue after removing that config header.

https://github.com/llvm/llvm-project/pull/97130


More information about the llvm-commits mailing list