diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-24 17:22:19 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-24 17:22:19 +0000 |
commit | aa3411e241a201d53a2689766fe419f2756819f3 (patch) | |
tree | cc19adfde0a10aab1ab566c8dfe3c1616e5cc390 /dev-util/bpftrace/files | |
parent | b7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (diff) |
gentoo resync : 24.03.2019
Diffstat (limited to 'dev-util/bpftrace/files')
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch b/dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch new file mode 100644 index 000000000000..14d6a167a863 --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.9-llvm-8.patch @@ -0,0 +1,30 @@ +diff --git a/src/bpforc.h b/src/bpforc.h +index a6ee583..8d0e579 100644 +--- a/src/bpforc.h ++++ b/src/bpforc.h +@@ -80,8 +80,13 @@ class BpfOrc + ExecutionSession ES; + std::unique_ptr<TargetMachine> TM; + std::shared_ptr<SymbolResolver> Resolver; ++#if LLVM_VERSION_MAJOR >= 8 ++ LegacyRTDyldObjectLinkingLayer ObjectLayer; ++ LegacyIRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; ++#else + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; ++#endif + + public: + std::map<std::string, std::tuple<uint8_t *, uintptr_t>> sections_; +@@ -91,7 +96,11 @@ class BpfOrc + Resolver(createLegacyLookupResolver(ES, + [](const std::string &Name __attribute__((unused))) -> JITSymbol { return nullptr; }, + [](Error Err) { cantFail(std::move(Err), "lookup failed"); })), ++#if LLVM_VERSION_MAJOR >= 8 ++ ObjectLayer(ES, [this](VModuleKey) { return LegacyRTDyldObjectLinkingLayer::Resources{std::make_shared<MemoryManager>(sections_), Resolver}; }), ++#else + ObjectLayer(ES, [this](VModuleKey) { return RTDyldObjectLinkingLayer::Resources{std::make_shared<MemoryManager>(sections_), Resolver}; }), ++#endif + CompileLayer(ObjectLayer, SimpleCompiler(*TM)) {} + + void compileModule(std::unique_ptr<Module> M) { |