From 6317e4004dded87d698b41274e31d318fe52e877 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 4 Jan 2021 19:44:50 +0100 Subject: 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] --- compiler/commands.nim | 4 ++++ compiler/main.nim | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler') 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) -- cgit 1.4.1-2-gfad0