[PATCH] D70292: Make it possible to redirect not only errs() but also outs()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 22:14:43 PST 2019
MaskRay added a comment.
In D70292#1749676 <https://reviews.llvm.org/D70292#1749676>, @jrtc27 wrote:
> This broke `-DBUILD_SHARED_LIBS=ON` for me; `lld::errs()` lives in Common, but Core has also been modified to use it, and Common depends on Core, not vice versa:
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:226 (lld/lib/Core/Resolver.cpp:226)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:255 (lld/lib/Core/Resolver.cpp:255)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:256 (lld/lib/Core/Resolver.cpp:256)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:269 (lld/lib/Core/Resolver.cpp:269)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:270 (lld/lib/Core/Resolver.cpp:270)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:282 (lld/lib/Core/Resolver.cpp:282)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:283 (lld/lib/Core/Resolver.cpp:283)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::resolveUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:427 (lld/lib/Core/Resolver.cpp:427)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::checkUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by Resolver.cpp:434 (lld/lib/Core/Resolver.cpp:434)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/Resolver.cpp.o:(lld::Resolver::checkUndefines())
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by SymbolTable.cpp:160 (lld/lib/Core/SymbolTable.cpp:160)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/SymbolTable.cpp.o:(lld::SymbolTable::addByName(lld::Atom const&))
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by SymbolTable.cpp:166 (lld/lib/Core/SymbolTable.cpp:166)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/SymbolTable.cpp.o:(lld::SymbolTable::addByName(lld::Atom const&))
>
> ld.lld: error: undefined symbol: lld::errs()
> >>> referenced by SymbolTable.cpp:190 (lld/lib/Core/SymbolTable.cpp:190)
> >>> tools/lld/lib/Core/CMakeFiles/lldCore.dir/SymbolTable.cpp.o:(lld::SymbolTable::addByName(lld::Atom const&))
> collect2: error: ld returned 1 exit status
>
My `-DBUILD_SHARED_LIBS=ON` build has the same problem. I think we need to move code around to fix this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70292/new/
https://reviews.llvm.org/D70292
More information about the llvm-commits
mailing list