static link lpthread correctly on windows

This commit is contained in:
ringabout
2023-04-20 13:44:30 +08:00
parent 24b6378382
commit 26c733dc7d
2 changed files with 3 additions and 2 deletions

View File

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

View File

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