Skip to content

Commit e3ea7a4

Browse files
committed
Build: add binary I/O files to Unix build
Adds binary_io_writer.c and binary_io_reader.c to the _remote_debugging module compilation. Also hooks up optional zstd support: when libzstd is found by pkg-config, the module compiles with HAVE_ZSTD defined and links against libzstd. Without zstd, the module still builds but compression is unavailable.
1 parent 7a58811 commit e3ea7a4

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

Modules/Setup.stdlib.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@MODULE__PICKLE_TRUE@_pickle _pickle.c
4242
@MODULE__QUEUE_TRUE@_queue _queuemodule.c
4343
@MODULE__RANDOM_TRUE@_random _randommodule.c
44-
@MODULE__REMOTE_DEBUGGING_TRUE@_remote_debugging _remote_debugging/module.c _remote_debugging/object_reading.c _remote_debugging/code_objects.c _remote_debugging/frames.c _remote_debugging/frame_cache.c _remote_debugging/threads.c _remote_debugging/asyncio.c
44+
@MODULE__REMOTE_DEBUGGING_TRUE@_remote_debugging _remote_debugging/module.c _remote_debugging/object_reading.c _remote_debugging/code_objects.c _remote_debugging/frames.c _remote_debugging/frame_cache.c _remote_debugging/threads.c _remote_debugging/asyncio.c _remote_debugging/binary_io_writer.c _remote_debugging/binary_io_reader.c
4545
@MODULE__STRUCT_TRUE@_struct _struct.c
4646

4747
# build supports subinterpreters

configure

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5529,6 +5529,18 @@ PKG_CHECK_MODULES([LIBZSTD], [libzstd >= 1.4.5], [have_libzstd=yes], [
55295529
])
55305530
])
55315531

5532+
dnl _remote_debugging module: optional zstd compression support
5533+
dnl The module always builds, but zstd compression is only available when libzstd is found
5534+
AS_VAR_IF([have_libzstd], [yes], [
5535+
REMOTE_DEBUGGING_CFLAGS="-DHAVE_ZSTD $LIBZSTD_CFLAGS"
5536+
REMOTE_DEBUGGING_LIBS="$LIBZSTD_LIBS"
5537+
], [
5538+
REMOTE_DEBUGGING_CFLAGS=""
5539+
REMOTE_DEBUGGING_LIBS=""
5540+
])
5541+
AC_SUBST([REMOTE_DEBUGGING_CFLAGS])
5542+
AC_SUBST([REMOTE_DEBUGGING_LIBS])
5543+
55325544
dnl PY_CHECK_NETDB_FUNC(FUNCTION)
55335545
AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [@%:@include <netdb.h>])])
55345546

@@ -7911,7 +7923,7 @@ PY_STDLIB_MOD_SIMPLE([_pickle])
79117923
PY_STDLIB_MOD_SIMPLE([_posixsubprocess])
79127924
PY_STDLIB_MOD_SIMPLE([_queue])
79137925
PY_STDLIB_MOD_SIMPLE([_random])
7914-
PY_STDLIB_MOD_SIMPLE([_remote_debugging])
7926+
PY_STDLIB_MOD_SIMPLE([_remote_debugging], [$REMOTE_DEBUGGING_CFLAGS], [$REMOTE_DEBUGGING_LIBS])
79157927
PY_STDLIB_MOD_SIMPLE([select])
79167928
PY_STDLIB_MOD_SIMPLE([_struct])
79177929
PY_STDLIB_MOD_SIMPLE([_types])

0 commit comments

Comments
 (0)