summary refs log tree commit diff stats
path: root/lib/system/nimscript.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-09-22 13:29:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-09-22 13:29:45 +0200
commit5298a72f34ad2eb3774d6d70bd3176773cc0651f (patch)
tree142185f084e29e0b323416acf5804dba80312252 /lib/system/nimscript.nim
parentae7fe5087f3e4f6ddc572254ae3ddcc8324099f1 (diff)
downloadNim-5298a72f34ad2eb3774d6d70bd3176773cc0651f.tar.gz
NimScript: added buildOS and buildCPU constants
Diffstat (limited to 'lib/system/nimscript.nim')
-rw-r--r--lib/system/nimscript.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/system/nimscript.nim b/lib/system/nimscript.nim
index 73bb91fef..f5b9cf3ed 100644
--- a/lib/system/nimscript.nim
+++ b/lib/system/nimscript.nim
@@ -11,6 +11,15 @@
 # Nim's configuration system now uses Nim for scripting. This module provides
 # a few things that are required for this to work.
 
+const
+  buildOS* {.magic: "BuildOS".}: string = ""
+    ## The OS this build is running on. Can be different from ``system.hostOS``
+    ## for cross compilations.
+
+  buildCPU* {.magic: "BuildCPU".}: string = ""
+    ## The CPU this build is running on. Can be different from ``system.hostCPU``
+    ## for cross compilations.
+
 template builtin = discard
 
 # We know the effects better than the compiler: