diff --git a/config/nim.cfg b/config/nim.cfg index a1559e24ac..13665936b6 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 6cc5dd9e0a..2c1cf6f1d6 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