diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-05-13 21:42:30 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-14 11:40:59 +0200 |
commit | 6ca8478548dba27cb00f640ba0cbae91f35871a9 (patch) | |
tree | da6e21db947b82da42260155c0baf29bfacf7e0d | |
parent | af593c2ef3abb323a60ae49e5f1bbb08ffb6262e (diff) | |
download | Nim-6ca8478548dba27cb00f640ba0cbae91f35871a9.tar.gz |
Minor fixes to enable tcc
-rw-r--r-- | config/nim.cfg | 2 | ||||
-rw-r--r-- | lib/pure/concurrency/threadpool.nim | 2 | ||||
-rw-r--r-- | lib/system/atomics.nim | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/config/nim.cfg b/config/nim.cfg index a2a774b23..9b3172e90 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -118,7 +118,7 @@ path="$lib/pure" # Configuration for the GNU C/C++ compiler: @if windows: #gcc.path = r"$nim\dist\mingw\bin" - @if gcc: + @if gcc or tcc: tlsEmulation:on @end @end diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index ca4f80f2a..6ec71e912 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -331,7 +331,7 @@ proc slave(w: ptr Worker) {.thread.} = await(w.taskArrived) # XXX Somebody needs to look into this (why does this assertion fail # in Visual Studio?) - when not defined(vcc): assert(not w.ready) + when not defined(vcc) and not defined(tcc): assert(not w.ready) withLock numSlavesLock: inc numSlavesRunning diff --git a/lib/system/atomics.nim b/lib/system/atomics.nim index fa3700190..56ebde823 100644 --- a/lib/system/atomics.nim +++ b/lib/system/atomics.nim @@ -241,7 +241,7 @@ when defined(vcc): else: {.error: "invalid CAS instruction".} -elif defined(tcc) and not defined(windows): +elif defined(tcc): when defined(amd64): {.emit:""" static int __tcc_cas(int *ptr, int oldVal, int newVal) @@ -262,7 +262,7 @@ static int __tcc_cas(int *ptr, int oldVal, int newVal) } """.} else: - assert sizeof(int) == 4 + #assert sizeof(int) == 4 {.emit:""" static int __tcc_cas(int *ptr, int oldVal, int newVal) { |