1.9 KiB
1.9 KiB
Defined
The following three lists are compiled from: Nim/compiler/platform.nim and Nim/compiler/extccomp.nim
One can use some name from them like:
when defined(Windows):
doSomething()
Operating Systems:
DOS
Windows
OS2
Linux
MorphOS
SkyOS
Solaris
Irix
NetBSD
FreeBSD
OpenBSD
AIX
PalmOS
QNX
Amiga
Atari
Netware
MacOS
MacOSX
Haiku
VxWorks
JS
NimrodVM
(also seenimvm
here)Standalone
CPU Architectures:
i386
m68k
alpha
powerpc
powerpc64
sparc
vm
ia64
amd64
mips
arm
js
nimrodvm
(also seenimvm
here)avr
Compilers:
vcc
Microsoft's Visual C++gcc
Gnu Cllvm_gcc
LLVM-GCC compilericc
Intel C++ compilerclang
Clang compilerbcc
Borland C Compilerdmc
Digital Mars C Compilerwcc
Watcom C Compilertcc
Tiny C Compilerpcc
Pelles C Compilerucc
Generic UNIX C compiler
compileOption
Also remember about how to access the compiler options:
when compileOption("boundChecks"): # d:release should disable this.
if i > q.high: # x < q.low is taken care by the Natural parameter
raise newException(IndexError, "Bla has less than " & $(i+1) & " elements.")
discard
TODO: List them here and how to correctly access the more complex ones.