QUICK_AND_DIRTY_NIMBLE

This commit is contained in:
Ștefan Talpalaru 2021-09-07 17:27:33 +02:00 committed by zah
parent 6589cedffa
commit 15bc75d4cf
2 changed files with 14 additions and 0 deletions

View File

@ -145,6 +145,13 @@ CI. Defaults to 0.
`make QUICK_AND_DIRTY_COMPILER=1 build-nim` `make QUICK_AND_DIRTY_COMPILER=1 build-nim`
### QUICK_AND_DIRTY_NIMBLE
Build Nimble when it wouldn't be normally built as part of the tools. Only
useful with `QUICK_AND_DIRTY_COMPILER=1`. Defaults to 0.
`make QUICK_AND_DIRTY_COMPILER=1 QUICK_AND_DIRTY_NIMBLE=1 build-nim`
### NIM_COMMIT ### NIM_COMMIT
Build and use a different Nim compiler version than the default one. Build and use a different Nim compiler version than the default one.

View File

@ -34,6 +34,7 @@ UCPU=""
[[ "$ARCH_OVERRIDE" == "x86" ]] && UCPU="ucpu=i686" [[ "$ARCH_OVERRIDE" == "x86" ]] && UCPU="ucpu=i686"
[[ -z "$NIM_BUILD_MSG" ]] && NIM_BUILD_MSG="Building the Nim compiler" [[ -z "$NIM_BUILD_MSG" ]] && NIM_BUILD_MSG="Building the Nim compiler"
[[ -z "$QUICK_AND_DIRTY_COMPILER" ]] && QUICK_AND_DIRTY_COMPILER=0 [[ -z "$QUICK_AND_DIRTY_COMPILER" ]] && QUICK_AND_DIRTY_COMPILER=0
[[ -z "$QUICK_AND_DIRTY_NIMBLE" ]] && QUICK_AND_DIRTY_NIMBLE=0
# Windows detection # Windows detection
if uname | grep -qiE "mingw|msys"; then if uname | grep -qiE "mingw|msys"; then
@ -205,6 +206,12 @@ build_nim() {
rm -f bin/nim rm -f bin/nim
cp -a compiler/nim bin/nim cp -a compiler/nim bin/nim
rm bin/nim1 rm bin/nim1
# Do we want Nimble in this quick build?
if [[ "${QUICK_AND_DIRTY_NIMBLE}" != "0" ]]; then
bin/nim c -d:release --noNimblePath --skipUserCfg --skipParentCfg dist/nimble/src/nimble.nim
mv dist/nimble/src/nimble bin/
fi
fi fi
# record the built commit # record the built commit