summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config/nim.cfg3
-rw-r--r--lib/std/typedthreads.nim2
2 files changed, 3 insertions, 2 deletions
diff --git a/config/nim.cfg b/config/nim.cfg
index a1559e24a..13665936b 100644
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -179,6 +179,9 @@ nimblepath="$home/.nimble/pkgs/"
 # Configuration for the GNU C/C++ compiler:
 @if windows:
   #gcc.path = r"$nim\dist\mingw\bin"
+  @if gcc:
+    gcc.options.linker %= "-Wl,-Bstatic -lpthread"
+  @end
   @if tcc:
     tlsEmulation:on
   @end
diff --git a/lib/std/typedthreads.nim b/lib/std/typedthreads.nim
index 6cc5dd9e0..2c1cf6f1d 100644
--- a/lib/std/typedthreads.nim
+++ b/lib/std/typedthreads.nim
@@ -35,8 +35,6 @@
 ##  deinitLock(L)
 
 
-when defined(windows) and defined(gcc) and (not compileOption("tlsEmulation")):
-  {.passl: "-Wl,-Bstatic -lpthread -Wl,-Bdynamic".}
 
 import std/private/[threadtypes]
 export Thread