[all-commits] [llvm/llvm-project] 3283a6: [mlir-cpu-runner] Add `export_executable_symbols` ...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Apr 7 07:41:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3283a6fb0df3717ed4888fd492a4bdac5b0cbbbc
      https://github.com/llvm/llvm-project/commit/3283a6fb0df3717ed4888fd492a4bdac5b0cbbbc
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    M mlir/tools/mlir-cpu-runner/CMakeLists.txt

  Log Message:
  -----------
  [mlir-cpu-runner] Add `export_executable_symbols` in CMake

This patch is primarily about the change in
"mlir/tools/mlir-cpu-runner/CMakeLists.txt". LLJIT needs access to
symbols (e.g. llvm_orc_registerEHFrameSectionWrapper) that will be
defined in the executable when LLVM is linked statically. This change is
consistent with how other tools within LLVM use LLJIT. It is required to
make sure that:
```
 $ mlir-cpu-runner --host-supports-jit
```
correctly returns `true` on platforms that do support JITting (in my
case that's AArch64 Linux).

The change in "mlir/lib/ExecutionEngine/CMakeLists.txt" is required to
avoid ODR violations when symbols from `mlir-cpu-runner` are exported
and when loading `libmlir_async_runtime.so` in `mlir-cpu-runner`.
Specifically, to avoid `EnableABIBreakingChecks` being defined twice.
For more context:
  * https://github.com/llvm/llvm-project/issues/61712
  * https://github.com/llvm/llvm-project/issues/61856
  * https://reviews.llvm.org/D146935 (this PR)

This change relands ccdcfad0815296d8952438632d9abe6bc0a5258a

Fixes #61856

Differential Revision: https://reviews.llvm.org/D146935




More information about the All-commits mailing list