merge BuildMode into SuccessX, remove code duplication w drnim, add useful info to successx, add gc to compilesettings (#18252)
* merge BuildMode into SuccessX, add more info * refactor duplicated with drnim * fixup * address comment
This commit is contained in:
parent
065243dc59
commit
e1e8af535e
10 changed files with 64 additions and 66 deletions
|
|
@ -1205,24 +1205,7 @@ proc mainCommand(graph: ModuleGraph) =
|
|||
registerPass graph, semPass
|
||||
compileProject(graph)
|
||||
if conf.errorCounter == 0:
|
||||
# xxx deduplicate with D20210419T170230
|
||||
let mem =
|
||||
when declared(system.getMaxMem): formatSize(getMaxMem()) & " peakmem"
|
||||
else: formatSize(getTotalMem()) & " totmem"
|
||||
let loc = $conf.linesCompiled
|
||||
let build = if isDefined(conf, "danger"): "Dangerous Release build"
|
||||
elif isDefined(conf, "release"): "Release build"
|
||||
else: "***SLOW, DEBUG BUILD***; -d:release makes code run faster."
|
||||
let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3)
|
||||
let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName
|
||||
rawMessage(conf, hintSuccessX, [
|
||||
"loc", loc,
|
||||
"sec", sec,
|
||||
"mem", mem,
|
||||
"project", project,
|
||||
"output", ""
|
||||
])
|
||||
rawMessage(conf, hintBuildMode, build)
|
||||
genSuccessX(graph.config)
|
||||
|
||||
proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
|
||||
var p = parseopt.initOptParser(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue