summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-08-08 17:53:21 +0800
committerGitHub <noreply@github.com>2023-08-08 17:53:21 +0800
commitbf5d173bc65aea071e5ffdf593f6b8797b56816d (patch)
tree6c0d44e2219e319a4726145d4b94e1e2deefd58e
parent4c6be40b340e3ce70b3ed2207db276cb9c661dbe (diff)
downloadNim-bf5d173bc65aea071e5ffdf593f6b8797b56816d.tar.gz
fixes LineTooLong hints on old compilers (#22412)
* fixes LineTooLong hints on old compilers

* fixes config/nim.cfg
-rw-r--r--compiler/condsyms.nim1
-rw-r--r--compiler/nim.cfg1
-rw-r--r--config/nim.cfg4
3 files changed, 6 insertions, 0 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim
index 58b89d933..638cb5c1e 100644
--- a/compiler/condsyms.nim
+++ b/compiler/condsyms.nim
@@ -160,3 +160,4 @@ proc initDefines*(symbols: StringTableRef) =
   defineSymbol("nimHasEnsureMove")
 
   defineSymbol("nimUseStrictDefs")
+  defineSymbol("nimHasNolineTooLong")
diff --git a/compiler/nim.cfg b/compiler/nim.cfg
index 4c55a04cb..040053685 100644
--- a/compiler/nim.cfg
+++ b/compiler/nim.cfg
@@ -50,3 +50,4 @@ define:useStdoutAsStdmsg
   warningAsError[Uninit]:on
   warningAsError[ProveInit]:on
 @end
+
diff --git a/config/nim.cfg b/config/nim.cfg
index 1470de780..7a2d5c76e 100644
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -14,6 +14,10 @@ cc = gcc
 # additional options always passed to the compiler:
 --parallel_build: "0" # 0 to auto-detect number of processors
 
+@if not nimHasNolineTooLong:
+  hint[LineTooLong]=off
+@end
+
 @if nimHasAmbiguousEnumHint:
   # not needed if hint is a style check
   hint[AmbiguousEnum]=off