[llvm-bugs] [Bug 52035] New: llvm-libtool-darwin doesn't support (Thin)LTO
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 1 14:57:50 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52035
Bug ID: 52035
Summary: llvm-libtool-darwin doesn't support (Thin)LTO
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: llvm-ar
Assignee: unassignedbugs at nondot.org
Reporter: phosek at chromium.org
CC: llvm-bugs at lists.llvm.org
I tried using llvm-libtool-darwin in (Thin)LTO build to avoid the dependency on
libLTO.dylib on Darwin but the tool fails with assertion failure:
Assertion failed: (T && T->hasMCAsmParser()), function
initializeRecordStreamer, file
/Users/phosek/llvm/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp, line 82.
Stack dump:
0 llvm-libtool-darwin 0x00000001062033a7
llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 llvm-libtool-darwin 0x00000001062022e8 llvm::sys::RunSignalHandlers() +
248
2 llvm-libtool-darwin 0x00000001062039d0 SignalHandler(int) + 272
3 libsystem_platform.dylib 0x00007fff2036dd7d _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603339975697056
5 libsystem_c.dylib 0x00007fff2027d406 abort + 125
6 libsystem_c.dylib 0x00007fff2027c7d8 err + 0
7 llvm-libtool-darwin 0x000000010631e2f1
initializeRecordStreamer(llvm::Module const&, llvm::function_ref<void
(llvm::RecordStreamer&)>) (.cold.1) + 33
8 llvm-libtool-darwin 0x00000001061727f3
initializeRecordStreamer(llvm::Module const&, llvm::function_ref<void
(llvm::RecordStreamer&)>) + 1891
9 llvm-libtool-darwin 0x0000000106172050
llvm::ModuleSymbolTable::addModule(llvm::Module*) + 992
10 llvm-libtool-darwin 0x000000010615485b
llvm::object::IRObjectFile::create(llvm::MemoryBufferRef, llvm::LLVMContext&) +
1291
11 llvm-libtool-darwin 0x0000000105ffc90d
verifyAndAddIRObject(std::__1::map<unsigned long long,
std::__1::vector<llvm::NewArchiveMember,
std::__1::allocator<llvm::NewArchiveMember> >, std::__1::less<unsigned long
long>, std::__1::allocator<std::__1::pair<unsigned long long const,
std::__1::vector<llvm::NewArchiveMember,
std::__1::allocator<llvm::NewArchiveMember> > > > >&, llvm::NewArchiveMember,
Config const&) + 109
12 llvm-libtool-darwin 0x0000000105ff8a18 main + 6264
13 libdyld.dylib 0x00007fff20343f3d start + 1
14 libdyld.dylib 0x0000000000000090 start + 18446603339975868756
To reproduce this issue, I used the following steps:
$ mkdir /Users/phosek/llvm/build/stage1 && cd /Users/phosek/llvm/build/stage1
$ cmake -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
../../llvm-project/llvm
$ ninja clang lld LTO llvm-symbolizer
$ mkdir /Users/phosek/llvm/build/stage2 && cd /Users/phosek/llvm/build/stage2
$ cmake -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER=/Users/phosek/llvm/build/stage1/bin/clang \
-DCMAKE_CXX_COMPILER=/Users/phosek/llvm/build/stage1/bin/clang++ \
-DCMAKE_LIBTOOL=/Users/phosek/llvm/build/stage1/bin/llvm-libtool-darwin \
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
-DLLVM_ENABLE_LLD=ON \
-DLLVM_ENABLE_LTO=ON \
../../llvm-project/llvm
$ ninja check-llvm
This reproduces with both LTO and ThinLTO.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211001/cdd1e270/attachment.html>
More information about the llvm-bugs
mailing list