summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-03-07 23:53:43 +0100
committerGitHub <noreply@github.com>2020-03-07 23:53:43 +0100
commiteae31a7f8d5f26bbfc27c3f0746a583154d451c9 (patch)
tree495ac437676bb53bb0beb71dd38756e8aad0102a
parent6a5b3811e7c8f0d20e23cf8b57ac28024f2620e3 (diff)
downloadNim-eae31a7f8d5f26bbfc27c3f0746a583154d451c9.tar.gz
Only print the link command when listCmd is active; fix docs (#13603)
-rw-r--r--compiler/extccomp.nim2
-rw-r--r--compiler/nim.cfg1
-rw-r--r--doc/advopt.txt4
3 files changed, 3 insertions, 4 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index b9d0f0ff6..b115721df 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -489,7 +489,7 @@ proc addExternalFileToLink*(conf: ConfigRef; filename: AbsoluteFile) =
   conf.externalToLink.insert(filename.string, 0)
 
 proc execWithEcho(conf: ConfigRef; cmd: string, msg = hintExecuting): int =
-  rawMessage(conf, msg, cmd)
+  rawMessage(conf, msg, if msg == hintLinking and not(optListCmd in conf.globalOptions or conf.verbosity > 1): "" else: cmd)
   result = execCmd(cmd)
 
 proc execExternalProgram*(conf: ConfigRef; cmd: string, msg = hintExecuting) =
diff --git a/compiler/nim.cfg b/compiler/nim.cfg
index f913e76a3..a77fa84d3 100644
--- a/compiler/nim.cfg
+++ b/compiler/nim.cfg
@@ -1,7 +1,6 @@
 # Special configuration file for the Nim project
 
 hint[XDeclaredButNotUsed]:off
-hint[Link]:off
 
 define:booting
 define:nimcore
diff --git a/doc/advopt.txt b/doc/advopt.txt
index 5c0ed86ee..517edab5b 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -125,8 +125,8 @@ Advanced options:
                             dynlib: "liblua.so.3"
   --dynlibOverrideAll
                             disables the effects of the dynlib pragma
-  --listCmd                 list the compilation commands; can be combined with:
-                            --hint:exec:on and --hint:link:on
+  --listCmd                 list the compilation commands; can be combined with
+                            `--hint:exec:on` and `--hint:link:on`
   --asm                     produce assembler code
   --parallelBuild:0|1|...   perform a parallel build
                             value = number of processors (0 for auto-detect)