mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-27 06:47:13 +00:00
CI: statically check stack size on Linux (#3055)
This commit is contained in:
parent
ea0a191723
commit
74f03ddadb
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -120,6 +120,12 @@ jobs:
|
||||
echo "ARCH=$ARCH" >> $GITHUB_ENV
|
||||
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
|
||||
|
||||
# Stack usage test on recent enough gcc:
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
|
||||
echo "NIMFLAGS=$NIMFLAGS" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# libminiupnp / natpmp
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'i386' ]]; then
|
||||
export CFLAGS="${CFLAGS} -m32 -mno-adx"
|
||||
|
@ -43,7 +43,8 @@ if defined(cwarnings):
|
||||
if defined(limitStackUsage):
|
||||
# This limits stack usage of each individual function to 1MB - the option is
|
||||
# available on some GCC versions but not all - run with `-d:limitStackUsage`
|
||||
# and look for .su files in "./nimcache/" that list the stack size of each function
|
||||
# and look for .su files in "./build/", "./nimcache/" or $TMPDIR that list the
|
||||
# stack size of each function.
|
||||
switch("passC", "-fstack-usage -Werror=stack-usage=1048576")
|
||||
switch("passL", "-fstack-usage -Werror=stack-usage=1048576")
|
||||
|
||||
|
2
vendor/nimbus-build-system
vendored
2
vendor/nimbus-build-system
vendored
@ -1 +1 @@
|
||||
Subproject commit 5fbffb22859a85aa0dc3e9238cc03d92ab197682
|
||||
Subproject commit e5bc3dd3a2736d0226c90c8300746069fdb69174
|
Loading…
x
Reference in New Issue
Block a user