summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 241f55224..fefabe53f 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1288,6 +1288,10 @@ const
   hasSharedHeap = defined(boehmgc) or defined(gogc) # don't share heaps; every thread has its own
   taintMode = compileOption("taintmode")
 
+when hasThreadSupport and defined(tcc) and not compileOption("tlsEmulation"):
+  # tcc doesn't support TLS
+  {.error: "``--tlsEmulation:on`` must be used when using threads with tcc backend".}
+  
 when defined(boehmgc):
   when defined(windows):
     const boehmLib = "boehmgc.dll"