diff options
-rw-r--r-- | lib/core/locks.nim | 4 | ||||
-rw-r--r-- | lib/core/rlocks.nim | 4 | ||||
-rw-r--r-- | testament/testament.nim | 4 | ||||
-rw-r--r-- | tests/stdlib/tsharedtable.nim | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/lib/core/locks.nim b/lib/core/locks.nim index 0143957ce..392c8aed4 100644 --- a/lib/core/locks.nim +++ b/lib/core/locks.nim @@ -9,6 +9,10 @@ ## This module contains Nim's support for locks and condition vars. + +when not compileOption("threads") and not defined(nimdoc): + {.error: "Locks requires --threads:on option.".} + const insideRLocksModule = false include "system/syslocks" diff --git a/lib/core/rlocks.nim b/lib/core/rlocks.nim index 4710d6cf1..34d7687f9 100644 --- a/lib/core/rlocks.nim +++ b/lib/core/rlocks.nim @@ -9,6 +9,10 @@ ## This module contains Nim's support for reentrant locks. + +when not compileOption("threads") and not defined(nimdoc): + {.error: "Rlocks requires --threads:on option.".} + const insideRLocksModule = true include "system/syslocks" diff --git a/testament/testament.nim b/testament/testament.nim index cf76cd971..da686a0c3 100644 --- a/testament/testament.nim +++ b/testament/testament.nim @@ -558,6 +558,10 @@ const disabledFilesDefault = @[ "setimpl.nim", "hashcommon.nim", + # Requires compiling with '--threads:on` + "sharedlist.nim", + "sharedtables.nim", + # Error: undeclared identifier: 'hasThreadSupport' "ioselectors_epoll.nim", "ioselectors_kqueue.nim", diff --git a/tests/stdlib/tsharedtable.nim b/tests/stdlib/tsharedtable.nim index 3269e7ee3..99d20e08a 100644 --- a/tests/stdlib/tsharedtable.nim +++ b/tests/stdlib/tsharedtable.nim @@ -1,4 +1,5 @@ discard """ +cmd: "nim $target --threads:on $options $file" output: ''' ''' """ |