summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index e27a4f6d1..a4425e510 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -65,6 +65,8 @@ proc commandCheck(graph: ModuleGraph) =
   if optWasNimscript in conf.globalOptions:
     defineSymbol(conf.symbols, "nimscript")
     defineSymbol(conf.symbols, "nimconfig")
+  elif conf.backend == backendJs:
+    setTarget(conf.target, osJS, cpuJS)
   semanticPasses(graph)  # use an empty backend for semantic checking only
   compileProject(graph)