File tree Expand file tree Collapse file tree 5 files changed +29
-2
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 5 files changed +29
-2
lines changed Original file line number Diff line number Diff line change
1
+ In debug build, import now also looks for C extensions compiled in release
2
+ mode and for C extensions compiled in the stable ABI.
Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ const char *_PyImport_DynLoadFiletab[] = {
38
38
".dll" ,
39
39
#else /* !__CYGWIN__ */
40
40
"." SOABI ".so" ,
41
- #ifndef Py_DEBUG
41
+ #ifdef ALT_SOABI
42
+ "." ALT_SOABI ".so" ,
43
+ #endif
42
44
".abi" PYTHON_ABI_STRING ".so" ,
43
- #endif /* ! Py_DEBUG */
44
45
".so" ,
45
46
#endif /* __CYGWIN__ */
46
47
NULL ,
Original file line number Diff line number Diff line change @@ -632,6 +632,7 @@ THREADHEADERS
632
632
LIBPL
633
633
PY_ENABLE_SHARED
634
634
EXT_SUFFIX
635
+ ALT_SOABI
635
636
SOABI
636
637
LIBC
637
638
LIBM
@@ -15127,6 +15128,17 @@ SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFO
15127
15128
{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $SOABI " >&5
15128
15129
$as_echo " $SOABI " >&6 ; }
15129
15130
15131
+ if test " $Py_DEBUG " = ' true' ; then
15132
+ # Similar to SOABI but remove "d" flag from ABIFLAGS
15133
+
15134
+ ALT_SOABI=' cpython-' ` echo $VERSION | tr -d .` ` echo $ABIFLAGS | tr -d d` ${PLATFORM_TRIPLET: +-$PLATFORM_TRIPLET }
15135
+
15136
+ cat >> confdefs.h << _ACEOF
15137
+ #define ALT_SOABI "${ALT_SOABI} "
15138
+ _ACEOF
15139
+
15140
+ fi
15141
+
15130
15142
15131
15143
case $ac_sys_system in
15132
15144
Linux* |GNU* |Darwin|VxWorks)
Original file line number Diff line number Diff line change @@ -4627,6 +4627,14 @@ AC_MSG_CHECKING(SOABI)
4627
4627
SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4628
4628
AC_MSG_RESULT ( $SOABI )
4629
4629
4630
+ if test "$Py_DEBUG" = 'true'; then
4631
+ # Similar to SOABI but remove "d" flag from ABIFLAGS
4632
+ AC_SUBST ( ALT_SOABI )
4633
+ ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
4634
+ AC_DEFINE_UNQUOTED ( ALT_SOABI , "${ALT_SOABI}" ,
4635
+ [ Alternative SOABI used in debug build to load C extensions built in release mode] )
4636
+ fi
4637
+
4630
4638
AC_SUBST ( EXT_SUFFIX )
4631
4639
case $ac_sys_system in
4632
4640
Linux*|GNU*|Darwin|VxWorks)
Original file line number Diff line number Diff line change 12
12
support for AIX C++ shared extension modules. */
13
13
#undef AIX_GENUINE_CPLUSPLUS
14
14
15
+ /* Alternative SOABI used in debug build to load C extensions built in release
16
+ mode */
17
+ #undef ALT_SOABI
18
+
15
19
/* The Android API level. */
16
20
#undef ANDROID_API_LEVEL
17
21
You can’t perform that action at this time.
0 commit comments