You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2019/04/09 20:01:33 UTC

[arrow] branch master updated: ARROW-5148: [Gandiva] Allow linking with RTTI-disabled LLVM builds

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d6f6d0  ARROW-5148: [Gandiva] Allow linking with RTTI-disabled LLVM builds
0d6f6d0 is described below

commit 0d6f6d02bfbc85eb3fcf1920a507722a824dd873
Author: Antoine Pitrou <an...@python.org>
AuthorDate: Tue Apr 9 22:01:26 2019 +0200

    ARROW-5148: [Gandiva] Allow linking with RTTI-disabled LLVM builds
    
    This should fix Travis-CI failures with binaries from apt.llvm.org.
    
    Author: Antoine Pitrou <an...@python.org>
    
    Closes #4135 from pitrou/ARROW-5148-llvm-rtti-fix and squashes the following commits:
    
    0d4206e94 <Antoine Pitrou> ARROW-5148:  Allow linking with RTTI-disabled LLVM builds
---
 cpp/src/gandiva/engine.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cpp/src/gandiva/engine.cc b/cpp/src/gandiva/engine.cc
index 22805bb..5abe4b5 100644
--- a/cpp/src/gandiva/engine.cc
+++ b/cpp/src/gandiva/engine.cc
@@ -146,11 +146,12 @@ Status Engine::LoadPreCompiledIR() {
   llvm::Expected<std::unique_ptr<llvm::Module>> module_or_error =
       llvm::getOwningLazyBitcodeModule(move(buffer), *context());
   if (!module_or_error) {
-    std::string error_string;
-    llvm::handleAllErrors(module_or_error.takeError(), [&](llvm::ErrorInfoBase& eib) {
-      error_string = eib.message();
-    });
-    return Status::CodeGenError(error_string);
+    // NOTE: llvm::handleAllErrors() fails linking with RTTI-disabled LLVM builds
+    // (ARROW-5148)
+    std::string str;
+    llvm::raw_string_ostream stream(str);
+    stream << module_or_error.takeError();
+    return Status::CodeGenError(stream.str());
   }
   std::unique_ptr<llvm::Module> ir_module = move(module_or_error.get());