summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-07-08 03:26:57 -0700
committerGitHub <noreply@github.com>2021-07-08 12:26:57 +0200
commit5a42f4a53e22051493232652cda7fb3d32c16da8 (patch)
treedcac3dd123b8e2f6b47ff68cb8236d4698e1e124
parent2d758795f05d8edf567011eeb49f0cdd38b6dc13 (diff)
downloadNim-5a42f4a53e22051493232652cda7fb3d32c16da8.tar.gz
followup #18252: show special flags -d:danger, -d:release when given (#18451)
-rw-r--r--compiler/msgs.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 8b4365ec4..242b06587 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -677,6 +677,10 @@ proc genSuccessX*(conf: ConfigRef) =
     elif optOptimizeSize in conf.options: build.add "size"
     else: build.add "none (DEBUG BUILD, `-d:release` generates faster code)"
       # pending https://github.com/timotheecour/Nim/issues/752, point to optimization.html
+    var flags = ""
+    if isDefined(conf, "danger"): flags.add " -d:danger"
+    elif isDefined(conf, "release"): flags.add " -d:release"
+    if flags.len > 0: build.add "; options:" & flags
   let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3)
   let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName
     # xxx honor conf.filenameOption more accurately