File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,12 @@ function(add_mlir_python_extension libname extname)
704
704
# NanobindAdaptors.h uses PyClassMethod_New to build `pure_subclass`es but nanobind
705
705
# doesn't declare this API as undefined in its linker flags. So we need to declare it as such
706
706
# for downstream users that do not do something like `-undefined dynamic_lookup`.
707
- target_link_options (${libname} PUBLIC "LINKER:-U,_PyClassMethod_New" )
707
+ # Same for the rest.
708
+ target_link_options (${libname} PUBLIC
709
+ "LINKER:-U,_PyClassMethod_New"
710
+ "LINKER:-U,_PyCode_Addr2Location"
711
+ "LINKER:-U,_PyFrame_GetLasti"
712
+ )
708
713
endif ()
709
714
endif ()
710
715
Original file line number Diff line number Diff line change @@ -2810,7 +2810,7 @@ class PyOpAttributeMap {
2810
2810
2811
2811
// bpo-42262 added Py_XNewRef()
2812
2812
#if !defined(Py_XNewRef)
2813
- PyObject *_Py_XNewRef (PyObject *obj) {
2813
+ [[maybe_unused]] PyObject *_Py_XNewRef (PyObject *obj) {
2814
2814
Py_XINCREF (obj);
2815
2815
return obj;
2816
2816
}
@@ -2819,7 +2819,7 @@ PyObject *_Py_XNewRef(PyObject *obj) {
2819
2819
2820
2820
// bpo-42262 added Py_NewRef()
2821
2821
#if !defined(Py_NewRef)
2822
- PyObject *_Py_NewRef (PyObject *obj) {
2822
+ [[maybe_unused]] PyObject *_Py_NewRef (PyObject *obj) {
2823
2823
Py_INCREF (obj);
2824
2824
return obj;
2825
2825
}
You can’t perform that action at this time.
0 commit comments