[PATCH] D146776: [llvm] Preliminary fat-lto-objects support
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 17 15:57:05 PDT 2023
MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.
Started to looking...
`-DBUILD_SHARED_LIBS=on` uses `-Wl,-z,defs` and can detect some library layering problems. `ninja LLVMBitWriter` doesn't build due to missing dependencies.
One issue can be addressed with the following change but the dependency may be a bit weird.
diff --git i/llvm/lib/Bitcode/Writer/CMakeLists.txt w/llvm/lib/Bitcode/Writer/CMakeLists.txt
index 2b17aa912016..51849d2d0fc0 100644
--- i/llvm/lib/Bitcode/Writer/CMakeLists.txt
+++ w/llvm/lib/Bitcode/Writer/CMakeLists.txt
@@ -17,2 +17,4 @@ add_llvm_component_library(LLVMBitWriter
TargetParser
+ TransformUtils
)
The other issue (`error: undefined symbol: llvm::ThinLTOBitcodeWriterPass::run`) is more tricky: LLVMipo (`llvm/lib/Transforms/IPO/CMakeLists.txt`) depends on LLVMBitWriter, so LLVMBitWriter cannot depend on LLVMipo.
================
Comment at: llvm/lib/Bitcode/Writer/EmbedBitcodePass.cpp:24
+#include "llvm/TargetParser/Triple.h"
+#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
+#include "llvm/Transforms/Utils/Cloning.h"
----------------
Including `llvm/Transforms` headers seems problematic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146776/new/
https://reviews.llvm.org/D146776
More information about the llvm-commits
mailing list