diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-04-21 06:26:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 15:26:27 +0200 |
commit | da1c1a711780e21a372ef70f9080aebe5b9ef987 (patch) | |
tree | e068b6248c791ba0899bad85efac113d8c5f8076 /compiler/main.nim | |
parent | c631648cb31b11d61d249e0745181acb0fcc30cc (diff) | |
download | Nim-da1c1a711780e21a372ef70f9080aebe5b9ef987.tar.gz |
`--filenames:abs|canonical|legacyRelProj` for filenames in compiler msgs (replaces `--listfullpaths:on|off`) (#17746)
* use canonicalImport for filename_magicSauce * --filenames:abs|canonical|magic * rename: magic => legacyRelProj
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index d66a5f329..9c9a789cb 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -362,6 +362,7 @@ proc mainCommand*(graph: ModuleGraph) = rawMessage(conf, errGenerated, "invalid command: " & conf.command) if conf.errorCounter == 0 and conf.cmd notin {cmdTcc, cmdDump, cmdNop}: + # D20210419T170230:here let mem = when declared(system.getMaxMem): formatSize(getMaxMem()) & " peakmem" else: formatSize(getTotalMem()) & " totmem" @@ -370,8 +371,8 @@ proc mainCommand*(graph: ModuleGraph) = elif isDefined(conf, "release"): "Release" else: "Debug" let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3) - let project = if optListFullPaths in conf.globalOptions: $conf.projectFull else: $conf.projectName - + let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName + # xxx honor conf.filenameOption more accurately var output: string if optCompileOnly in conf.globalOptions and conf.cmd != cmdJsonscript: output = $conf.jsonBuildFile @@ -380,7 +381,8 @@ proc mainCommand*(graph: ModuleGraph) = output = "unknownOutput" else: output = $conf.absOutFile - if optListFullPaths notin conf.globalOptions: output = output.AbsoluteFile.extractFilename + if conf.filenameOption != foAbs: output = output.AbsoluteFile.extractFilename + # xxx honor filenameOption more accurately if optProfileVM in conf.globalOptions: echo conf.dump(conf.vmProfileData) rawMessage(conf, hintSuccessX, [ |