Nim
Nim copied to clipboard
compileOption("threads") never be false within NimScript
Nim Version
$ nim -v
Nim Compiler Version 2.2.2 [Linux: amd64]
Compiled at 2025-02-06
Copyright (c) 2006-2025 by Andreas Rumpf
git hash: 6c34f62785263ad412f662f3e4e4bf8d8751d113
active boot switches: -d:release
Description
The value of compileOption(“threads”) is always true within NimScript even if passing --threads:off.
This may be due to the fact that NimScript is actually running in multi-threaded mode, but it is a little inconvenient for building a build system.
# config.nims
echo compileOption("threads")
$ nim c --threads:off somewhat
Current Output
true
Expected Output
false
Known Workarounds
No response
Additional Information
No response