From 62af617f84a447473319eb7f0de836b953d147a3 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 24 Nov 2010 23:19:23 +0100 Subject: [PATCH] Dynamically link with pthreads-w32 Adds some explanation what would need to be done to link pthreads statically --- deps/libeio/eio.c | 8 +++++--- wscript | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c index ce0ff39861..27f94ad047 100644 --- a/deps/libeio/eio.c +++ b/deps/libeio/eio.c @@ -42,9 +42,11 @@ #ifdef EIO_STACKSIZE # define XTHREAD_STACKSIZE EIO_STACKSIZE #endif -#ifdef _WIN32 -# define PTW32_STATIC_LIB 1 -#endif + +// For statically-linked pthreads-w32, use: +// #ifdef _WIN32 +// # define PTW32_STATIC_LIB 1 +// #endif #include "xthread.h" #include diff --git a/wscript b/wscript index ebf6a1b1ff..45722d6b5a 100644 --- a/wscript +++ b/wscript @@ -396,6 +396,13 @@ def configure(conf): # Split off debug variant before adding variant specific defines debug_env = conf.env.copy() conf.set_env_name('debug', debug_env) + + if (sys.platform.startswith("win32")): + # Static pthread - crashes + #conf.env.append_value('LINKFLAGS', '../deps/pthreads-w32/libpthreadGC2.a') + #debug_env.append_value('LINKFLAGS', '../deps/pthreads-w32/libpthreadGC2d.a') + # Pthread dll + conf.env.append_value('LIB', 'pthread.dll') # Configure debug variant conf.setenv('debug')