Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-llvm: Commit

external/llvm


Commit MetaInfo

Revision22cc92c7004d3951bdd26f0b61d2daa6f57f78a1 (tree)
Time2019-09-22 21:35:55
AuthorMauro Rossi <issor.oruam@gmai...>
CommiterMauro Rossi

Log Message

Android: Fix soong building rules for llvm 9.0

The necessary static dependencies are added for Android blueprint build.

Changelog:
Build libLLVMJITLink static by adding lib/ExecutionEngine/JITLink/Android.bp
Build libLLVMRemarks static by adding lib/Remarks/Android.bp
Add libLLVMMIRParser, libLLVMJITLink and libLLVMRemarks dependencies in ./Android.bp

Fixes the following building errors at linking:

FAILED: out/soong/.intermediates/external/llvm/libLLVM/android_x86_core_shared/libLLVM.so
...
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
...
external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1371: error: undefined reference to 'llvm::remarks::StringTable::serialize() const'
external/llvm/lib/IR/DiagnosticInfo.cpp:435: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:436: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:437: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:457: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
...
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:337: error: undefined reference to 'llvm::jitlink::jitLink(std::1::unique_ptr<llvm::jitlink::JITLinkContext, std::1::default_delete<llvm::jitlink::JITLinkContext> >)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:422: error: undefined reference to 'llvm::jitlink::createEHFrameRecorderPass(llvm::Triple const&, std::1::function<void (unsigned long long)>)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:444: error: undefined reference to 'llvm::jitlink::registerEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:457: error: undefined reference to 'llvm::jitlink::deregisterEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:476: error: undefined reference to 'llvm::jitlink::deregisterEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:25: error: undefined reference to 'llvm::jitlink::JITLinkContext::~JITLinkContext()'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:25: error: undefined reference to 'llvm::jitlink::JITLinkContext::~JITLinkContext()'
out/soong/.intermediates/external/llvm/lib/ExecutionEngine/Orc/libLLVMOrcJIT/android_x86_core_static/libLLVMOrcJIT.a(ObjectLinkingLayer.o):ObjectLinkingLayer.cpp:vtable for llvm::orc::ObjectLinkingLayerJITLinkContext: error: undefined reference to 'llvm::jitlink::JITLinkContext::shouldAddDefaultTargetPasses(llvm::Triple const&) const'
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>

Change Summary

Incremental Difference

--- a/Android.bp
+++ b/Android.bp
@@ -273,6 +273,9 @@ cc_library_shared {
273273 "libLLVMMCJIT",
274274 "libLLVMOrcJIT",
275275 "libLLVMBinaryFormat",
276+ "libLLVMMIRParser",
277+ "libLLVMRemarks",
278+ "libLLVMJITLink",
276279 ],
277280
278281 export_include_dirs: ["include"],
--- /dev/null
+++ b/lib/ExecutionEngine/JITLink/Android.bp
@@ -0,0 +1,7 @@
1+cc_library_static {
2+ name: "libLLVMJITLink",
3+ defaults: [
4+ "llvm-lib-defaults",
5+ ],
6+ srcs: ["*.cpp"],
7+}
--- /dev/null
+++ b/lib/Remarks/Android.bp
@@ -0,0 +1,7 @@
1+cc_library_static {
2+ name: "libLLVMRemarks",
3+ defaults: [
4+ "llvm-lib-defaults",
5+ ],
6+ srcs: ["*.cpp"],
7+}
Show on old repository browser