[Mlir-commits] [mlir] [MLIR][ExecutionEngine] Introduce shared library (PR #87067)

Maksim Levental llvmlistbot at llvm.org
Fri May 31 20:36:28 PDT 2024


makslevental wrote:

> inside `add_mlir_library`, but that has been like this "forever".

So maybe this the correct answer but then I don't understand why eg some of the other libraries in this very same touched CMake don't inherit the link dep:

```
(mlir-aie) mlevental at mlevental-F7BSC:~/dev_projects/mlir-wheels$ ldd /home/mlevental/dev_projects/mlir-wheels/build/temp/lib/libmlir_arm_runner_utils.so
        linux-vdso.so.1 (0x00007fff65ca6000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5017e00000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5017a00000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5017d19000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f50180c5000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f501807c000)
(mlir-aie) mlevental at mlevental-F7BSC:~/dev_projects/mlir-wheels$ ldd /home/mlevental/dev_projects/mlir-wheels/build/temp/lib/libmlir_float16_utils.so
        linux-vdso.so.1 (0x00007fff82987000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f59a6c00000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f59a6800000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f59a6b19000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f59a6f72000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f59a6f29000)
```

Note, the answer isn't `EXCLUDE_FROM_LIBMLIR` because 

```
  add_mlir_library(mlir_float16_utils
    SHARED
    Float16bits.cpp

    EXCLUDE_FROM_LIBMLIR
    )
```

but

```
  add_mlir_library(mlir_arm_runner_utils
    SHARED
    ArmRunnerUtils.cpp)
```

https://github.com/llvm/llvm-project/pull/87067


More information about the Mlir-commits mailing list