From 8ae49eddc8521714926352c66deda2b5c0ac1637 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 19 May 2013 14:40:29 +0200 Subject: [PATCH] --os and --cpu work in configuration files --- compiler/commands.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/commands.nim b/compiler/commands.nim index 63704b3289..ca0c309bd6 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: