diff options
Diffstat (limited to 'dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch')
-rw-r--r-- | dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch b/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch new file mode 100644 index 000000000000..b6c4242e4459 --- /dev/null +++ b/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch @@ -0,0 +1,32 @@ +From 87a2de4b22e141d37b796dce77a6daef243145eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Thu, 11 Jun 2020 09:22:32 +0200 +Subject: [PATCH] Use std::make_unique on LLVM 10 + +LLVM 10 removes llvm::make_unique in favor of std::make_unique. +However, this requires C++14 and is therefore unsuitable for LLVM 9 +that forces -std=c++11. Update the code to use both conditionally. +This fixes all issues with LLVM 10. +--- + ffi/linker.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ffi/linker.cpp b/ffi/linker.cpp +index 57bb80b..585b261 100644 +--- a/ffi/linker.cpp ++++ b/ffi/linker.cpp +@@ -42,7 +42,11 @@ LLVMPY_LinkModules(LLVMModuleRef Dest, LLVMModuleRef Src, const char **Err) + auto OldDiagnosticHandler = Ctx.getDiagnosticHandler(); + + // set the handler to a new one ++#if LLVM_VERSION_MAJOR >= 10 ++ Ctx.setDiagnosticHandler(std::make_unique<ReportNotAbortDiagnosticHandler>(errstream)); ++#else + Ctx.setDiagnosticHandler(llvm::make_unique<ReportNotAbortDiagnosticHandler>(errstream)); ++#endif + + // link + bool failed = LLVMLinkModules2(Dest, Src); +-- +2.27.0 + |