Skip to content

Commit 6674109

Browse files
committed
Use custom closure allocation on macos
1 parent 6db1135 commit 6674109

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python.cext/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ set(CTYPES_SRC
367367
"${SRC_DIR}/modules/_ctypes/ctypes.h"
368368
"${SRC_DIR}/modules/_ctypes/stgdict.c"
369369
)
370+
if(APPLE)
371+
set(CTYPES_SRC ${CTYPES_SRC} "${SRC_DIR}/modules/_ctypes/malloc_closure.c")
372+
endif()
370373
native_module("_ctypes" TRUE "${CTYPES_SRC}")
371374
target_include_directories("_ctypes" PUBLIC "${SRC_DIR}/modules/_ctypes")
372375
find_library(FFI_LIBRARY
@@ -414,7 +417,7 @@ elseif(APPLE)
414417
HAVE_DECL_RTLD_LOCAL
415418
HAVE_DECL_RTLD_GLOBAL
416419
HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
417-
HAVE_BUILTIN_AVAILABLE
420+
USING_MALLOC_CLOSURE_DOT_C
418421
)
419422
else()
420423
target_compile_definitions("_ctypes" PRIVATE

0 commit comments

Comments
 (0)