* build&style fixes
* use multithreading for LTO outside of make too
* blst 0.3.10 with no significant changes
This commit is contained in:
Jacek Sieka 2022-11-24 21:56:02 +01:00 committed by GitHub
parent 61c5ac32d8
commit 04392c236b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 30 additions and 27 deletions

View File

@ -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

View File

@ -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",

View File

@ -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 <unknown>, 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

View File

@ -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

2
vendor/nim-bearssl vendored

@ -1 +1 @@
Subproject commit f4c4233de453cb7eac0ce3f3ffad6496295f83ab
Subproject commit d0271920a734b8c02186785390e2fdf56624790b

2
vendor/nim-blscurve vendored

@ -1 +1 @@
Subproject commit f60f1905c264dd8c6fee15b31fb5b3138c40b429
Subproject commit 48d8668c5a9a350d3a7ee0c3713ef9a11980a40d

2
vendor/nim-chronos vendored

@ -1 +1 @@
Subproject commit 6525f4ce1d1a7eba146e5f1a53f6f105077ae686
Subproject commit 189f6e390c4ed73921b8b847b65d4f1d331752f4

@ -1 +1 @@
Subproject commit a26bfab7e5fb2f9fc018e5d778c169bc05772ee6
Subproject commit 56f4db90f7923a4d6814837dda9f44c8955c52a4

@ -1 +1 @@
Subproject commit 6112432b3a81d9db116cd5d64c39648881cfff29
Subproject commit d68f64254eaedc1309b36fd28272c943c83ab409

@ -1 +1 @@
Subproject commit b42cd3c0d9c433079f3c075365440392e4278b1b
Subproject commit a7d815ed92f200f490c95d3cfd722089cc923ce6

@ -1 +1 @@
Subproject commit c7f1a37d9b0f17292649bfed8bf6cef83cf4221f
Subproject commit 88b2702fea7666227a889bbe60bc91c01dc68a86

@ -1 +1 @@
Subproject commit 60a5bd8ac0461dfadd3069fd9c01a7734f205995
Subproject commit d77417cba6896c26287a68e6a95762e45a1b87e5

2
vendor/nim-snappy vendored

@ -1 +1 @@
Subproject commit 7cb2e57a58619a6ca2be94db94591467a41d8476
Subproject commit 235c33c5ef4c016771bae794b21b092bd9662e08

2
vendor/nim-stew vendored

@ -1 +1 @@
Subproject commit d087c039c2f88e06851b22040dd95f37452c3c81
Subproject commit 7184d2424dc3945657884646a72715d494917aad

@ -1 +1 @@
Subproject commit 17e8479a7495ac96480485782c09b6d4f4bcfa12
Subproject commit 89d693d3ffc9e53aa470a9a05166e4f2b58d282a

@ -1 +1 @@
Subproject commit dc535cd4627e6c1ec023ee6d6d0c3e5d66d414e5
Subproject commit 8c59324e8fc5d5f1126e9d4f5ff38f37322dab45