followup #18252: show special flags -d:danger, -d:release when given (#18451)

This commit is contained in:
Timothee Cour
2021-07-08 03:26:57 -07:00
committed by GitHub
parent 2d758795f0
commit 5a42f4a53e

View File

@@ -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