From 04392c236b1f057d05952802b93420170a167138 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 24 Nov 2022 21:56:02 +0100 Subject: [PATCH] bumps (#4352) * build&style fixes * use multithreading for LTO outside of make too * blst 0.3.10 with no significant changes --- Makefile | 12 ++++-------- beacon_chain.nimble | 7 ++++--- config.nims | 8 ++++++-- scripts/compile_nim_program.sh | 6 ++++-- vendor/nim-bearssl | 2 +- vendor/nim-blscurve | 2 +- vendor/nim-chronos | 2 +- vendor/nim-confutils | 2 +- vendor/nim-faststreams | 2 +- vendor/nim-json-serialization | 2 +- vendor/nim-secp256k1 | 2 +- vendor/nim-serialization | 2 +- vendor/nim-snappy | 2 +- vendor/nim-stew | 2 +- vendor/nim-taskpools | 2 +- vendor/nimbus-build-system | 2 +- 16 files changed, 30 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index fb5e681e5..0ce26e60b 100644 --- a/Makefile +++ b/Makefile @@ -331,7 +331,7 @@ build/generate_makefile: | libbacktrace endif build/generate_makefile: tools/generate_makefile.nim | deps-common + echo -e $(BUILD_MSG) "$@" && \ - $(ENV_SCRIPT) nim c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim $(SILENCE_WARNINGS) && \ + $(ENV_SCRIPT) $(NIMC) c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim $(SILENCE_WARNINGS) && \ echo -e $(BUILD_END_MSG) "$@" # GCC's LTO parallelisation is able to detect a GNU Make jobserver and get its @@ -638,13 +638,9 @@ nimbus-pkg: | nimbus_beacon_node xcodebuild -project installer/macos/nimbus-pkg.xcodeproj -scheme nimbus-pkg build packagesbuild installer/macos/nimbus-pkg.pkgproj -ctail: | build deps - mkdir -p vendor/.nimble/bin/ - + $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim - ntu: | build deps mkdir -p vendor/.nimble/bin/ - + $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim + + $(ENV_SCRIPT) $(NIMC) -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim clean: | clean-common rm -rf build/{$(TOOLS_CSV),all_tests,test_*,proto_array,fork_choice,*.a,*.so,*_node,*ssz*,nimbus_*,beacon_node*,block_sim,state_sim,transition*,generate_makefile,nimbus-wix/obj} @@ -654,7 +650,7 @@ endif libnfuzz.so: | build deps + echo -e $(BUILD_MSG) "build/$@" && \ - $(ENV_SCRIPT) nim c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \ + $(ENV_SCRIPT) $(NIMC) c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \ echo -e $(BUILD_END_MSG) "build/$@" && \ rm -f build/$@ && \ ln -s $@.0 build/$@ @@ -662,7 +658,7 @@ libnfuzz.so: | build deps libnfuzz.a: | build deps + echo -e $(BUILD_MSG) "build/$@" && \ rm -f build/$@ && \ - $(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \ + $(ENV_SCRIPT) $(NIMC) c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \ echo -e $(BUILD_END_MSG) "build/$@" && \ [[ -e "$@" ]] && mv "$@" build/ || true # workaround for https://github.com/nim-lang/Nim/issues/12745 diff --git a/beacon_chain.nimble b/beacon_chain.nimble index 1995024b9..dae4ed16c 100644 --- a/beacon_chain.nimble +++ b/beacon_chain.nimble @@ -43,7 +43,8 @@ requires( requires "https://gitlab.com/status-im/nimbus-security-resources.git" -namedBin = { +import tables +let namedBin = { "beacon_chain/nimbus_beacon_node": "nimbus_beacon_node", "beacon_chain/nimbus_validator_client": "nimbus_validator_client", "ncli/ncli": "ncli", @@ -53,10 +54,10 @@ binDir = "build" skipDirs = @[ ".github", - ".vscode" + ".vscode", "docker", "grafana", - "installer". + "installer", "media", "nfuzz", "research", diff --git a/config.nims b/config.nims index dea1e2127..3ceb27ad8 100644 --- a/config.nims +++ b/config.nims @@ -33,8 +33,8 @@ if defined(release) and not defined(disableLTO): switch("passC", "-flto=thin") switch("passL", "-flto=thin -Wl,-object_path_lto," & nimCachePath & "/lto") elif defined(linux): - switch("passC", "-flto=jobserver") - switch("passL", "-flto=jobserver") + switch("passC", "-flto=auto") + switch("passL", "-flto=auto") switch("passC", "-finline-limit=100000") switch("passL", "-finline-limit=100000") else: @@ -182,6 +182,10 @@ switch("warning", "ObservableStores:off") # Too many false positives for "Warning: method has lock level , but another method has 0 [LockLevel]" switch("warning", "LockLevel:off") +# Too many of these because of Defect compat in 1.2 +if (NimMajor, NimMinor) >= (1, 6): + switch("hint", "XCannotRaiseY:off") + # Useful for Chronos metrics. #--define:chronosFutureTracking diff --git a/scripts/compile_nim_program.sh b/scripts/compile_nim_program.sh index aa8163e12..03de46002 100755 --- a/scripts/compile_nim_program.sh +++ b/scripts/compile_nim_program.sh @@ -9,12 +9,14 @@ SOURCE="$2" # the rest are NIM_PARAMS shift 2 +NIMC="${NIMC:-nim}" + # verbosity level [[ -z "$V" ]] && V=0 # Nim version (formatted as "{MAJOR}{MINOR}"). # This weird "sed" invocation is because of macOS. -NIM_VERSION=$(nim --version | head -n1 | sed -E 's/^.* ([0-9])\.([0-9]+).*$/\1\2/') +NIM_VERSION=$("$NIMC" --version | head -n1 | sed -E 's/^.* ([0-9])\.([0-9]+).*$/\1\2/') # According to old Nim compiler versions, the project name comes from the main # source file, not the output binary. @@ -29,7 +31,7 @@ fi # parallel. # We can't use '--nimcache:...' here, because the same path is being used by # LTO on macOS, in "config.nims" -nim c --compileOnly -o:build/${BINARY} "$@" -d:nimCachePathOverride=nimcache/release/${BINARY} "${SOURCE}" +"$NIMC" c --compileOnly -o:build/${BINARY} "$@" -d:nimCachePathOverride=nimcache/release/${BINARY} "${SOURCE}" build/generate_makefile "nimcache/release/${BINARY}/${PROJECT_NAME}.json" "nimcache/release/${BINARY}/${BINARY}.makefile" # Don't swallow stderr, in case it's important. [[ "$V" == "0" ]] && exec >/dev/null diff --git a/vendor/nim-bearssl b/vendor/nim-bearssl index f4c4233de..d0271920a 160000 --- a/vendor/nim-bearssl +++ b/vendor/nim-bearssl @@ -1 +1 @@ -Subproject commit f4c4233de453cb7eac0ce3f3ffad6496295f83ab +Subproject commit d0271920a734b8c02186785390e2fdf56624790b diff --git a/vendor/nim-blscurve b/vendor/nim-blscurve index f60f1905c..48d8668c5 160000 --- a/vendor/nim-blscurve +++ b/vendor/nim-blscurve @@ -1 +1 @@ -Subproject commit f60f1905c264dd8c6fee15b31fb5b3138c40b429 +Subproject commit 48d8668c5a9a350d3a7ee0c3713ef9a11980a40d diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 6525f4ce1..189f6e390 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 6525f4ce1d1a7eba146e5f1a53f6f105077ae686 +Subproject commit 189f6e390c4ed73921b8b847b65d4f1d331752f4 diff --git a/vendor/nim-confutils b/vendor/nim-confutils index a26bfab7e..56f4db90f 160000 --- a/vendor/nim-confutils +++ b/vendor/nim-confutils @@ -1 +1 @@ -Subproject commit a26bfab7e5fb2f9fc018e5d778c169bc05772ee6 +Subproject commit 56f4db90f7923a4d6814837dda9f44c8955c52a4 diff --git a/vendor/nim-faststreams b/vendor/nim-faststreams index 6112432b3..d68f64254 160000 --- a/vendor/nim-faststreams +++ b/vendor/nim-faststreams @@ -1 +1 @@ -Subproject commit 6112432b3a81d9db116cd5d64c39648881cfff29 +Subproject commit d68f64254eaedc1309b36fd28272c943c83ab409 diff --git a/vendor/nim-json-serialization b/vendor/nim-json-serialization index b42cd3c0d..a7d815ed9 160000 --- a/vendor/nim-json-serialization +++ b/vendor/nim-json-serialization @@ -1 +1 @@ -Subproject commit b42cd3c0d9c433079f3c075365440392e4278b1b +Subproject commit a7d815ed92f200f490c95d3cfd722089cc923ce6 diff --git a/vendor/nim-secp256k1 b/vendor/nim-secp256k1 index c7f1a37d9..88b2702fe 160000 --- a/vendor/nim-secp256k1 +++ b/vendor/nim-secp256k1 @@ -1 +1 @@ -Subproject commit c7f1a37d9b0f17292649bfed8bf6cef83cf4221f +Subproject commit 88b2702fea7666227a889bbe60bc91c01dc68a86 diff --git a/vendor/nim-serialization b/vendor/nim-serialization index 60a5bd8ac..d77417cba 160000 --- a/vendor/nim-serialization +++ b/vendor/nim-serialization @@ -1 +1 @@ -Subproject commit 60a5bd8ac0461dfadd3069fd9c01a7734f205995 +Subproject commit d77417cba6896c26287a68e6a95762e45a1b87e5 diff --git a/vendor/nim-snappy b/vendor/nim-snappy index 7cb2e57a5..235c33c5e 160000 --- a/vendor/nim-snappy +++ b/vendor/nim-snappy @@ -1 +1 @@ -Subproject commit 7cb2e57a58619a6ca2be94db94591467a41d8476 +Subproject commit 235c33c5ef4c016771bae794b21b092bd9662e08 diff --git a/vendor/nim-stew b/vendor/nim-stew index d087c039c..7184d2424 160000 --- a/vendor/nim-stew +++ b/vendor/nim-stew @@ -1 +1 @@ -Subproject commit d087c039c2f88e06851b22040dd95f37452c3c81 +Subproject commit 7184d2424dc3945657884646a72715d494917aad diff --git a/vendor/nim-taskpools b/vendor/nim-taskpools index 17e8479a7..89d693d3f 160000 --- a/vendor/nim-taskpools +++ b/vendor/nim-taskpools @@ -1 +1 @@ -Subproject commit 17e8479a7495ac96480485782c09b6d4f4bcfa12 +Subproject commit 89d693d3ffc9e53aa470a9a05166e4f2b58d282a diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index dc535cd46..8c59324e8 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit dc535cd4627e6c1ec023ee6d6d0c3e5d66d414e5 +Subproject commit 8c59324e8fc5d5f1126e9d4f5ff38f37322dab45