[PATCH] D47440: Use uniform mechanism for OOM errors handling
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 28 23:57:02 PDT 2018
lebedev.ri added subscribers: dblaikie, lebedev.ri.
lebedev.ri added a comment.
It would seem this is slightly incorrect.
$ ninja -j1
[1/4533] Linking CXX shared library lib/libLLVMDemangle.so.7svn
FAILED: lib/libLLVMDemangle.so.7svn
: && /usr/bin/clang++-6.0 -fPIC -g0 -fPIC -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -g0 -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMDemangle.so.7 -o lib/libLLVMDemangle.so.7svn lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" && :
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::itaniumDemangle(char const*, char*, unsigned long*, int*))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::printNode((anonymous namespace)::Node*, char*, unsigned long*))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionDeclContextName(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionDeclContextName(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionDeclContextName(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionParameters(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionParameters(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionParameters(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionParameters(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:(llvm::ItaniumPartialDemangler::getFunctionReturnType(char*, unsigned long*) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::PODSmallVector<(anonymous namespace)::Node*, 32ul>::push_back((anonymous namespace)::Node* const&))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::PODSmallVector<(anonymous namespace)::Node*, 32ul>::push_back((anonymous namespace)::Node* const&))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::SpecialName::printLeft((anonymous namespace)::OutputStream&) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::CtorVtableSpecialName::printLeft((anonymous namespace)::OutputStream&) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::CtorVtableSpecialName::printLeft((anonymous namespace)::OutputStream&) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::Db::parseTemplateArgs(bool))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::Db::parseTemplateArgs(bool))
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::Db::parseTemplateParam())
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::Db::parseTemplateParam())
/usr/lib/llvm-6.0/bin/ld.lld: error: undefined symbol: llvm::report_bad_alloc_error(char const*, bool)
>>> referenced by ItaniumDemangle.cpp
>>> lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o:((anonymous namespace)::NameType::printLeft((anonymous namespace)::OutputStream&) const)
/usr/lib/llvm-6.0/bin/ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
If i try to fix it:
diff --git a/lib/Demangle/CMakeLists.txt b/lib/Demangle/CMakeLists.txt
index 74e37654f07..e03b555e3a6 100644
--- a/lib/Demangle/CMakeLists.txt
+++ b/lib/Demangle/CMakeLists.txt
@@ -1,3 +1,6 @@
add_llvm_library(LLVMDemangle
ItaniumDemangle.cpp
+
+ LINK_LIBS
+ LLVMSupport
)
It does not work:
Configuring done
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
"LLVMDemangle" of type SHARED_LIBRARY
depends on "LLVMSupport" (weak)
"LLVMSupport" of type SHARED_LIBRARY
depends on "LLVMDemangle" (weak)
At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries.
CMake Project parsing failed.
So this somehow introduced a cycle into dependency graph?
@dblaikie, at rnk, at sepavloff Thoughts on temporarily reverting for now?
Repository:
rL LLVM
https://reviews.llvm.org/D47440
More information about the llvm-commits
mailing list