[Mlir-commits] [mlir] [MLIR] Fix nanobind linker args on macOS (PR #125733)
Marius Brehler
llvmlistbot at llvm.org
Wed Feb 5 02:07:14 PST 2025
marbre wrote:
> > Would it be better if I made it a PUBLIC link property so that downstream link dependencies also inherited the symbol?
>
> Ya that's a reasonable in-between.
>
> Btw cc @marbre this change wouldn't affect IREE right because we just duplicated this same patch locally (in IREE CMake)?
What we have in IREE atm to work around the issue is
```cmake
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-U -Wl,_PyClassMethod_New")
```
at top-level (https://github.com/iree-org/iree/blob/56bb652fd6b03b7473994426aa4a698f87a1418a/CMakeLists.txt#L655) if building for macOS. IREE also uses `declare_mlir_python_extension` for its compiler Python bindings and what is there upstream didn't kicked in.
Happy to give this patch a try before merging upstream if you want me to (?).
https://github.com/llvm/llvm-project/pull/125733
More information about the Mlir-commits
mailing list