diff --git a/README.md b/README.md index 7da7009..723c61b 100644 --- a/README.md +++ b/README.md @@ -140,13 +140,11 @@ Link PCRE, defaults to 1. ### QUICK_AND_DIRTY_COMPILER -Skip multiple Nim compiler bootstrap iterations and tool building. Useful in +Skip some Nim compiler bootstrap iterations and tool building. Useful in CI. Defaults to 0. `make QUICK_AND_DIRTY_COMPILER=1 build-nim` -__Don't use this!__ It produces [a buggy Nim-1.2.6 compiler](https://github.com/status-im/nimbus-eth2/pull/2220). - ## Make targets ### build diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 71db9d9..0878fca 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -148,7 +148,26 @@ build_nim() { --skipUserCfg \ --skipParentCfg \ compiler/nim.nim + cp -a compiler/nim bin/nim1 + # If we stop here, we risk ending up with a buggy compiler: https://github.com/status-im/nimbus-eth2/pull/2220 + bin/nim1 \ + c \ + --compileOnly \ + --nimcache:nimcache \ + -d:release \ + --skipUserCfg \ + --skipParentCfg \ + --warnings:off \ + --hints:off \ + compiler/nim.nim + bin/nim1 \ + jsonscript \ + --nimcache:nimcache \ + --skipUserCfg \ + --skipParentCfg \ + compiler/nim.nim cp -a compiler/nim bin/nim + rm bin/nim1 fi # record the last commit's timestamp