Please do not merge this patch. I'd like some feedback on the solution I adopted here. This patch changes fundamentally how bolt is built. Problem: Bolt does not support standalone builds and depends heavily on internal LLVM headers and object files. Previously, all the required headers were getting copied and the rest of the code except bolt was removed. This solution has the advantage of reducing the amount of objects being built, but increases the effort humans have to spent when updating the source code whenever bolt adds a new dependency. Instead of removing the source code, this patch tries to follow a closer approach that is supported by bolt and only removes the cmake entries leading to unnecessary libraries being built via the patch rm-llvm-libs.diff. This solution increases build time, but may not require any modifications in future updates. If bolt starts depending on any of the removed libraries, the patch must be updated. The removal of new libraries is not required, but it's recommended in order to keep build time as low as possible. For the record, after applying this patch, an Intel(R) Core(TM) i7-11850H built bolt in ~26 minutes.
49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
|
|
index 283baa6090eb..7642e2d9efca 100644
|
|
--- a/llvm/lib/CMakeLists.txt
|
|
+++ b/llvm/lib/CMakeLists.txt
|
|
@@ -4,43 +4,29 @@ include(LLVM-Build)
|
|
# CMakeLists.txt
|
|
|
|
add_subdirectory(IR)
|
|
-add_subdirectory(FuzzMutate)
|
|
add_subdirectory(FileCheck)
|
|
-add_subdirectory(InterfaceStub)
|
|
add_subdirectory(IRPrinter)
|
|
add_subdirectory(IRReader)
|
|
add_subdirectory(CodeGen)
|
|
add_subdirectory(BinaryFormat)
|
|
add_subdirectory(Bitcode)
|
|
add_subdirectory(Bitstream)
|
|
-add_subdirectory(DWARFLinker)
|
|
-add_subdirectory(DWARFLinkerParallel)
|
|
-add_subdirectory(Extensions)
|
|
add_subdirectory(Frontend)
|
|
add_subdirectory(Transforms)
|
|
-add_subdirectory(Linker)
|
|
add_subdirectory(Analysis)
|
|
-add_subdirectory(LTO)
|
|
add_subdirectory(MC)
|
|
-add_subdirectory(MCA)
|
|
add_subdirectory(ObjCopy)
|
|
add_subdirectory(Object)
|
|
add_subdirectory(ObjectYAML)
|
|
-add_subdirectory(Option)
|
|
add_subdirectory(Remarks)
|
|
add_subdirectory(Debuginfod)
|
|
add_subdirectory(DebugInfo)
|
|
add_subdirectory(DWP)
|
|
add_subdirectory(ExecutionEngine)
|
|
add_subdirectory(Target)
|
|
-add_subdirectory(AsmParser)
|
|
-add_subdirectory(LineEditor)
|
|
add_subdirectory(ProfileData)
|
|
-add_subdirectory(Passes)
|
|
add_subdirectory(TargetParser)
|
|
add_subdirectory(TextAPI)
|
|
-add_subdirectory(ToolDrivers)
|
|
-add_subdirectory(XRay)
|
|
if (LLVM_INCLUDE_TESTS)
|
|
add_subdirectory(Testing)
|
|
endif()
|