OSDN Git Service

[mlir:JitRunner] Use custom shared library init/destroy functions if available
authorEugene Zhulenev <ezhulenev@google.com>
Fri, 8 Jan 2021 16:18:39 +0000 (08:18 -0800)
committerEugene Zhulenev <ezhulenev@google.com>
Fri, 8 Jan 2021 21:16:08 +0000 (13:16 -0800)
commit1fc986427ba32384a03286472d3c04b37420ad73
tree72ffddf0ad8289c7b5c974447ee97634331b39cf
parent0e23fd676c3984a2b867c167950464262c8e0dc6
[mlir:JitRunner] Use custom shared library init/destroy functions if available

Use custom mlir runner init/destroy functions to safely init and destroy shared libraries loaded by the JitRunner.

This mechanism is ignored for Windows builds (for now) because init/destroy functions are not exported, and library unloading relies on static destructors.

Re-submit https://reviews.llvm.org/D94270 with a temporary workaround for windows

Differential Revision: https://reviews.llvm.org/D94312
mlir/lib/ExecutionEngine/AsyncRuntime.cpp
mlir/lib/ExecutionEngine/CMakeLists.txt
mlir/lib/ExecutionEngine/JitRunner.cpp