mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
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:
@@ -14,7 +14,6 @@ threads:off
|
||||
|
||||
@if windows:
|
||||
cincludes: "$lib/wrappers/libffi/common"
|
||||
tlsEmulation:off
|
||||
@end
|
||||
|
||||
define:useStdoutAsStdmsg
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
when defined(windows):
|
||||
--tlsEmulation:off
|
||||
--mm:refc
|
||||
|
||||
Reference in New Issue
Block a user