summary refs log tree commit diff stats
path: root/compiler/nim.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-10-02 12:44:10 +0800
committerGitHub <noreply@github.com>2022-10-02 06:44:10 +0200
commit81e7811e01b22518cb5e533cf75ed5dda0873415 (patch)
tree926a5970388cfb9b6d734f9bc2f7760a38aa6738 /compiler/nim.nim
parent0769b160c5e1e3f17a87c4a50c0c8d4ba076858f (diff)
downloadNim-81e7811e01b22518cb5e533cf75ed5dda0873415.tar.gz
fixes nim check with orc (#20456)
* fixes nim check with orc

* fixes tests

* add tests

* fixes tests

* Update tests/arc/t20456.nim
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r--compiler/nim.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim
index 2a6b3bc1b..b98a514d7 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -97,6 +97,10 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
   if not self.loadConfigsAndProcessCmdLine(cache, conf, graph):
     return
 
+  if conf.cmd == cmdCheck and optWasNimscript notin conf.globalOptions and
+       conf.backend == backendInvalid:
+    conf.backend = backendC
+
   if conf.selectedGC == gcUnselected:
     if conf.backend in {backendC, backendCpp, backendObjc}:
       initOrcDefines(conf)