Use upstream build system when possible (#61)
This commit is contained in:
parent
2e69505479
commit
cb65dbcd80
|
@ -127,6 +127,25 @@ build_nim() {
|
||||||
# working directory
|
# working directory
|
||||||
pushd "$NIM_DIR"
|
pushd "$NIM_DIR"
|
||||||
|
|
||||||
|
if grep -q skipIntegrityCheck koch.nim; then
|
||||||
|
# Run Nim buildchain
|
||||||
|
. ci/funs.sh
|
||||||
|
NIMCORES=1 nimBuildCsourcesIfNeeded $UCPU
|
||||||
|
bin/nim c --noNimblePath --skipUserCfg --skipParentCfg --warnings:off --hints:off koch
|
||||||
|
./koch --skipIntegrityCheck boot -d:release --skipUserCfg --skipParentCfg --warnings:off --hints:off
|
||||||
|
if [[ "${QUICK_AND_DIRTY_COMPILER}" == "0" ]]; then
|
||||||
|
# We want tools
|
||||||
|
./koch tools -d:release --skipUserCfg --skipParentCfg --warnings:off --hints:off
|
||||||
|
elif [[ "${QUICK_AND_DIRTY_NIMBLE}" != "0" ]]; then
|
||||||
|
# We just want nimble
|
||||||
|
./koch nimble -d:release --skipUserCfg --skipParentCfg --warnings:off --hints:off
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Custom buildchain for older versions
|
||||||
|
# TODO Remove this once the default NIM_COMMIT supports `--skipIntegrityCheck`
|
||||||
|
# We will still be able to compile older versions by removing the flag,
|
||||||
|
# which will just waste a bit of CPU
|
||||||
|
|
||||||
# Git repos for csources and Nimble
|
# Git repos for csources and Nimble
|
||||||
if [[ ! -d "$CSOURCES_DIR" ]]; then
|
if [[ ! -d "$CSOURCES_DIR" ]]; then
|
||||||
if git merge-base --is-ancestor $CSOURCES_V2_START_COMMIT $NIM_COMMIT_HASH; then
|
if git merge-base --is-ancestor $CSOURCES_V2_START_COMMIT $NIM_COMMIT_HASH; then
|
||||||
|
@ -246,6 +265,7 @@ build_nim() {
|
||||||
rm -f bin/cacert.pem
|
rm -f bin/cacert.pem
|
||||||
curl -LsS -o bin/cacert.pem https://curl.se/ca/cacert.pem || echo "Warning: 'curl' failed to download a CA cert needed by Nimble. Ignoring it."
|
curl -LsS -o bin/cacert.pem https://curl.se/ca/cacert.pem || echo "Warning: 'curl' failed to download a CA cert needed by Nimble. Ignoring it."
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# record the built commit
|
# record the built commit
|
||||||
echo ${NIM_COMMIT_HASH} > bin/last_built_commit
|
echo ${NIM_COMMIT_HASH} > bin/last_built_commit
|
||||||
|
|
Loading…
Reference in New Issue