summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-09-06 21:42:04 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-09-06 21:42:04 +0300
commitabedb3aa560dcd3281bd307f65f5dce93b2be319 (patch)
tree0cb6a0e7d18de4c6611dd84a9b0ebd03672f6d6e /CMakeLists.txt
parent149d1b3734dd9a0c05250bd2543f13469687666d (diff)
downloadbdwgc-abedb3aa560dcd3281bd307f65f5dce93b2be319.tar.gz
Avoid dirty_init warn of incremental mode incompatible with fork on Darwin
(fix of commit 3c571c7ad) Issue #151 (bdwgc). To both support GC incremental mode and GC functions usage in the forked child, pthread_atfork should be used to install handlers that switch off GC_incremental in the child gracefully. For now, we just disable incremental mode if fork() handling is requested by client. Previously, GC incremental mode was disabled if parallel marker is on. * CMakeLists.txt [APPLE && enable_handle_fork && !disable_handle_fork && enable_parallel_mark] (HANDLE_FORK): Do not define; update comment. * configure.ac [$enable_handle_fork!=yes && $enable_handle_fork!=no && $enable_handle_fork!=manual && $THREADS==posix && $host==*-*-darwin* && $use_parallel_mark!=no] (HANDLE_FORK): Likewise.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 2 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 282c8b1e..4fdaed04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,12 +194,8 @@ if (CMAKE_USE_PTHREADS_INIT)
if (ANDROID OR MSYS) # ANDROID variable is defined by CMake v3.7.0+.
# Android NDK does not provide pthread_atfork.
elseif (APPLE)
- if (enable_handle_fork AND NOT disable_handle_fork)
- # The incremental mode conflicts with fork handling.
- if (enable_parallel_mark)
- add_definitions("-DHANDLE_FORK")
- endif(enable_parallel_mark)
- endif()
+ # The incremental mode conflicts with fork handling (for now).
+ # Thus, HANDLE_FORK is not defined.
set(SRC ${SRC} darwin_stop_world.c)
elseif (enable_handle_fork AND NOT disable_handle_fork)
add_definitions("-DHANDLE_FORK")