summary refs log tree commit diff stats
path: root/compiler/main.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-12-29 16:21:33 -0800
committerAndreas Rumpf <rumpf_a@web.de>2018-12-30 01:21:33 +0100
commit9c65ea0d16828a5e13b136aa05348bce15312dc6 (patch)
tree6553cedc636c364a0ab400ca9441a591f563fe21 /compiler/main.nim
parent083129286349ba440018cff1ed20172b675b84fe (diff)
downloadNim-9c65ea0d16828a5e13b136aa05348bce15312dc6.tar.gz
`nim c` now allows: when defined(c) (#10130)
Diffstat (limited to 'compiler/main.nim')
-rw-r--r--compiler/main.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index 2b2907794..54dc8cb23 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -167,6 +167,7 @@ proc mainCommand*(graph: ModuleGraph) =
   of "c", "cc", "compile", "compiletoc":
     # compile means compileToC currently
     conf.cmd = cmdCompileToC
+    defineSymbol(graph.config.symbols, "c")
     commandCompileToC(graph)
   of "cpp", "compiletocpp":
     conf.cmd = cmdCompileToCpp