static link pthread correctly (#21693)

This commit is contained in:
ringabout
2023-04-20 23:35:15 +08:00
committed by GitHub
parent ed7c6cdc98
commit f9477396a6
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