summary refs log tree commit diff stats
path: root/compiler/commands.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-01-07 20:26:40 +0100
committerGitHub <noreply@github.com>2021-01-07 20:26:40 +0100
commit796498525a3d1197cd6468e4eb45b1fb47a702af (patch)
tree68774cbab36c280a2a9e953d2cc83f4c82e8adaa /compiler/commands.nim
parent0da4cb93d1924d99a91491c2ec6124d9ec2a413b (diff)
downloadNim-796498525a3d1197cd6468e4eb45b1fb47a702af.tar.gz
IC: next steps (#16550)
* cleanups
* ast.nim: cleanups
* IC: no more sym.tab field, stored externally in the module graph
* nimble compiles again
* rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly
* rodfiles: added compilerproc and export sections
* rodfiles: added all the missing sections
* rodfiles: track the missing information
* IC: architecture for lazy loading of proc bodies
* make tests green again
* completed the lazy loading of proc bodies
* symbol lookup integration, part 1
* symbol lookup integration, part 2
* symbol lookup integration, part 3
* make tcompilerapi work again
* rodfiles: fixed config change handling
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r--compiler/commands.nim17
1 files changed, 9 insertions, 8 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 9fb9b7e6e..adb85bdd7 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -801,14 +801,15 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
     expectNoArg(conf, switch, arg, pass, info)
     helpOnError(conf, pass)
   of "symbolfiles": discard "ignore for backwards compat"
-  of "incremental":
-    case arg.normalize
-    of "on": conf.symbolFiles = v2Sf
-    of "off": conf.symbolFiles = disabledSf
-    of "writeonly": conf.symbolFiles = writeOnlySf
-    of "readonly": conf.symbolFiles = readOnlySf
-    of "v2": conf.symbolFiles = v2Sf
-    else: localError(conf, info, "invalid option for --incremental: " & arg)
+  of "incremental", "ic":
+    if pass in {passCmd2, passPP}:
+      case arg.normalize
+      of "on": conf.symbolFiles = v2Sf
+      of "off": conf.symbolFiles = disabledSf
+      of "writeonly": conf.symbolFiles = writeOnlySf
+      of "readonly": conf.symbolFiles = readOnlySf
+      of "v2": conf.symbolFiles = v2Sf
+      else: localError(conf, info, "invalid option for --incremental: " & arg)
   of "skipcfg":
     processOnOffSwitchG(conf, {optSkipSystemConfigFile}, arg, pass, info)
   of "skipprojcfg":