Skip to content

Commit 440b55a

Browse files
fix spawn not used on linux (#25206)
Subj, among other things slows down the compilation of large projects on linux significantly.
1 parent 02609f1 commit 440b55a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pure/osproc.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ elif not defined(useNimRtl):
945945
options: set[ProcessOption]
946946

947947
const useProcessAuxSpawn = declared(posix_spawn) and not defined(useFork) and
948-
not defined(useClone) and not defined(linux)
948+
not (defined(useClone) and defined(linux))
949949
when useProcessAuxSpawn:
950950
proc startProcessAuxSpawn(data: StartProcessData): Pid {.
951951
raises: [OSError], tags: [ExecIOEffect, ReadEnvEffect, ReadDirEffect, RootEffect], gcsafe.}
@@ -1103,7 +1103,7 @@ elif not defined(useNimRtl):
11031103
var pid: Pid
11041104
var dataCopy = data
11051105

1106-
when defined(useClone):
1106+
when defined(useClone) and defined(linux):
11071107
const stackSize = 65536
11081108
let stackEnd = cast[clong](alloc(stackSize))
11091109
let stack = cast[pointer](stackEnd + stackSize)

0 commit comments

Comments
 (0)