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)
704704 # NanobindAdaptors.h uses PyClassMethod_New to build `pure_subclass`es but nanobind
705705 # doesn't declare this API as undefined in its linker flags. So we need to declare it as such
706706 # 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+ )
708713 endif ()
709714 endif ()
710715
Original file line number Diff line number Diff line change @@ -2810,7 +2810,7 @@ class PyOpAttributeMap {
28102810
28112811// bpo-42262 added Py_XNewRef()
28122812#if !defined(Py_XNewRef)
2813- PyObject *_Py_XNewRef (PyObject *obj) {
2813+ [[maybe_unused]] PyObject *_Py_XNewRef (PyObject *obj) {
28142814 Py_XINCREF (obj);
28152815 return obj;
28162816}
@@ -2819,7 +2819,7 @@ PyObject *_Py_XNewRef(PyObject *obj) {
28192819
28202820// bpo-42262 added Py_NewRef()
28212821#if !defined(Py_NewRef)
2822- PyObject *_Py_NewRef (PyObject *obj) {
2822+ [[maybe_unused]] PyObject *_Py_NewRef (PyObject *obj) {
28232823 Py_INCREF (obj);
28242824 return obj;
28252825}
You can’t perform that action at this time.
0 commit comments