summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-05-19 14:40:29 +0200
committerAraq <rumpf_a@web.de>2013-05-19 14:40:29 +0200
commit8ae49eddc8521714926352c66deda2b5c0ac1637 (patch)
treea57e07eadc9d9a6eae7c7c279ef004c44faced4f /compiler
parentf16ded879b61428043cc4f78ae117de591c9339b (diff)
downloadNim-8ae49eddc8521714926352c66deda2b5c0ac1637.tar.gz
--os and --cpu work in configuration files
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 63704b328..ca0c309bd 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -424,7 +424,7 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
     incl(gGlobalOptions, optGenMapping)
   of "os": 
     expectArg(switch, arg, pass, info)
-    if (pass == passCmd1): 
+    if pass in {passCmd1, passPP}: 
       theOS = platform.NameToOS(arg)
       if theOS == osNone: LocalError(info, errUnknownOS, arg)
       elif theOS != platform.hostOS: 
@@ -432,7 +432,7 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
         condsyms.InitDefines()
   of "cpu": 
     expectArg(switch, arg, pass, info)
-    if (pass == passCmd1): 
+    if pass in {passCmd1, passPP}: 
       cpu = platform.NameToCPU(arg)
       if cpu == cpuNone: LocalError(info, errUnknownCPU, arg)
       elif cpu != platform.hostCPU: