diff options
-rw-r--r-- | compiler/extccomp.nim | 18 | ||||
-rw-r--r-- | compiler/msgs.nim | 9 |
2 files changed, 13 insertions, 14 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 8d3260275..40d25ab2e 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -438,16 +438,12 @@ proc addFileToLink*(filename: string) = prependStr(toLink, filename) # BUGFIX: was ``appendStr`` -proc execWithEcho(cmd: string, prettyCmd = ""): int = - if optListCmd in gGlobalOptions or gVerbosity > 0: - if prettyCmd != "": - msgWriteln(prettyCmd) - else: - msgWriteln(cmd) +proc execWithEcho(cmd: string, msg = hintExecuting): int = + rawMessage(msg, cmd) result = execCmd(cmd) -proc execExternalProgram*(cmd: string, prettyCmd = "") = - if execWithEcho(cmd, prettyCmd) != 0: +proc execExternalProgram*(cmd: string, msg = hintExecuting) = + if execWithEcho(cmd, msg) != 0: rawMessage(errExecutionOfProgramFailed, "") proc generateScript(projectFile: string, script: Rope) = @@ -703,10 +699,8 @@ proc callCCompiler*(projectfile: string) = "nim", quoteShell(getPrefixDir()), "lib", quoteShell(libpath)]) if optCompileOnly notin gGlobalOptions: - if gVerbosity == 1: - execExternalProgram(linkCmd, "[Linking]") - else: - execExternalProgram(linkCmd) + execExternalProgram(linkCmd, + if gVerbosity > 1: hintExecuting else: hintLinking) else: linkCmd = "" if optGenScript in gGlobalOptions: diff --git a/compiler/msgs.nim b/compiler/msgs.nim index fbc73ef15..20a59a132 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -126,6 +126,7 @@ type hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled, hintProcessing, hintCodeBegin, hintCodeEnd, hintConf, hintPath, hintConditionAlwaysTrue, hintName, hintPattern, + hintExecuting, hintLinking, hintUser const @@ -416,6 +417,8 @@ const hintConditionAlwaysTrue: "condition is always true: '$1'", hintName: "name should be: '$1'", hintPattern: "$1", + hintExecuting: "$1", + hintLinking: "", hintUser: "$1"] const @@ -431,10 +434,10 @@ const "ProveInit", "ProveField", "ProveIndex", "GcUnsafe", "GcUnsafe2", "Uninit", "GcMem", "Destructor", "LockLevel", "ResultShadowed", "User"] - HintsToStr*: array[0..16, string] = ["Success", "SuccessX", "LineTooLong", + HintsToStr*: array[0..18, string] = ["Success", "SuccessX", "LineTooLong", "XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded", "ExprAlwaysX", "QuitCalled", "Processing", "CodeBegin", "CodeEnd", "Conf", - "Path", "CondTrue", "Name", "Pattern", + "Path", "CondTrue", "Name", "Pattern", "Exec", "Link", "User"] const @@ -492,10 +495,12 @@ const warnGcUnsafe, hintSuccessX, hintPath, hintConf, hintProcessing, + hintExecuting, hintLinking, hintCodeBegin, hintCodeEnd}, {low(TNoteKind)..high(TNoteKind)} - {warnShadowIdent, warnUninit, warnProveField, warnProveIndex, warnGcUnsafe, + hintExecuting, hintCodeBegin, hintCodeEnd}, {low(TNoteKind)..high(TNoteKind)}, {low(TNoteKind)..high(TNoteKind)}] |