fixes #18146; fixes #19372; disable tlsEmulation on windows; static link pthreads with mingw (#21668)

* fixes #18146; disable tlsEmulation on windows; static link libwinthreads DLL

* whatever
This commit is contained in:
ringabout
2023-04-15 04:52:35 +08:00
committed by GitHub
parent 1a99bcd6ab
commit 512517c223
5 changed files with 5 additions and 6 deletions

View File

@@ -14,7 +14,6 @@ threads:off
@if windows:
cincludes: "$lib/wrappers/libffi/common"
tlsEmulation:off
@end
define:useStdoutAsStdmsg

View File

@@ -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

View File

@@ -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

View File

@@ -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")

View File

@@ -1,3 +1 @@
when defined(windows):
--tlsEmulation:off
--mm:refc