summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-01-04 19:44:50 +0100
committerGitHub <noreply@github.com>2021-01-04 19:44:50 +0100
commit6317e4004dded87d698b41274e31d318fe52e877 (patch)
treea21e58f061793aa1b4efff4d8e5031b4f4e93c12 /compiler
parent80c8f06663658e12fcdcd2d36a0ee38683de552a (diff)
downloadNim-6317e4004dded87d698b41274e31d318fe52e877.tar.gz
make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4]

* fixes #16404 [backport:1.4]
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim4
-rw-r--r--compiler/main.nim2
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index b52148668..9fb9b7e6e 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -572,6 +572,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
         if pass in {passCmd2, passPP}:
           defineSymbol(conf.symbols, "nimSeqsV2")
           defineSymbol(conf.symbols, "nimV2")
+        if conf.exc == excNone and conf.backend != backendCpp:
+          conf.exc = excGoto
       of "orc":
         conf.selectedGC = gcOrc
         defineSymbol(conf.symbols, "gcdestructors")
@@ -581,6 +583,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
         if pass in {passCmd2, passPP}:
           defineSymbol(conf.symbols, "nimSeqsV2")
           defineSymbol(conf.symbols, "nimV2")
+        if conf.exc == excNone and conf.backend != backendCpp:
+          conf.exc = excGoto
       of "hooks":
         conf.selectedGC = gcHooks
         defineSymbol(conf.symbols, "gchooks")
diff --git a/compiler/main.nim b/compiler/main.nim
index 868198268..4c67aaea7 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -192,8 +192,6 @@ proc mainCommand*(graph: ModuleGraph) =
         # A better solution might be to fix system.nim
         undefSymbol(conf.symbols, "useNimRtl")
     of backendInvalid: doAssert false
-    if conf.selectedGC in {gcArc, gcOrc} and conf.backend != backendCpp:
-      conf.exc = excGoto
 
   proc compileToBackend() =
     customizeForBackend(conf.backend)