diff options
-rw-r--r-- | compiler/nim.cfg | 1 | ||||
-rw-r--r-- | config/nim.cfg | 2 | ||||
-rw-r--r-- | lib/std/typedthreads.nim | 4 | ||||
-rw-r--r-- | tests/config.nims | 2 | ||||
-rw-r--r-- | tests/ic/config.nims | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/compiler/nim.cfg b/compiler/nim.cfg index b9c8fdc08..5e70c2975 100644 --- a/compiler/nim.cfg +++ b/compiler/nim.cfg @@ -14,7 +14,6 @@ threads:off @if windows: cincludes: "$lib/wrappers/libffi/common" - tlsEmulation:off @end define:useStdoutAsStdmsg diff --git a/config/nim.cfg b/config/nim.cfg index ef93ec99e..ad6129c6d 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -179,7 +179,7 @@ nimblepath="$home/.nimble/pkgs/" # Configuration for the GNU C/C++ compiler: @if windows: #gcc.path = r"$nim\dist\mingw\bin" - @if gcc or tcc: + @if tcc: tlsEmulation:on @end @end diff --git a/lib/std/typedthreads.nim b/lib/std/typedthreads.nim index 8359ca353..6cc5dd9e0 100644 --- a/lib/std/typedthreads.nim +++ b/lib/std/typedthreads.nim @@ -34,6 +34,10 @@ ## ## deinitLock(L) + +when defined(windows) and defined(gcc) and (not compileOption("tlsEmulation")): + {.passl: "-Wl,-Bstatic -lpthread -Wl,-Bdynamic".} + import std/private/[threadtypes] export Thread diff --git a/tests/config.nims b/tests/config.nims index 4bcd67143..3772648e6 100644 --- a/tests/config.nims +++ b/tests/config.nims @@ -40,8 +40,6 @@ switch("define", "nimPreviewDotLikeOps") switch("define", "nimPreviewJsonutilsHoleyEnum") switch("define", "nimPreviewHashRef") switch("define", "nimPreviewRangeDefault") -when defined(windows): - switch("tlsEmulation", "off") switch("warningAserror", "UnnamedBreak") switch("legacy", "verboseTypeMismatch") diff --git a/tests/ic/config.nims b/tests/ic/config.nims index a522efb0d..a622ec309 100644 --- a/tests/ic/config.nims +++ b/tests/ic/config.nims @@ -1,3 +1 @@ -when defined(windows): - --tlsEmulation:off --mm:refc |