mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-16 16:38:07 +00:00
LTO: allow GCC to use Make's jobserver
This commit is contained in:
parent
e69b5ff473
commit
ab4880d4b4
16
Makefile
16
Makefile
@ -145,10 +145,14 @@ test: | build deps
|
|||||||
ifeq ($(DISABLE_TEST_FIXTURES_SCRIPT), 0)
|
ifeq ($(DISABLE_TEST_FIXTURES_SCRIPT), 0)
|
||||||
V=$(V) scripts/setup_official_tests.sh
|
V=$(V) scripts/setup_official_tests.sh
|
||||||
endif
|
endif
|
||||||
$(ENV_SCRIPT) nim test $(NIM_PARAMS) beacon_chain.nims && rm -f 0000-*.json
|
+ $(ENV_SCRIPT) nim test $(NIM_PARAMS) beacon_chain.nims && rm -f 0000-*.json
|
||||||
|
|
||||||
|
#- GCC's LTO parallelisation is able to detect a GNU Make jobserver and get its
|
||||||
|
# maximum number of processes from there, but only if we use the "+" prefix.
|
||||||
|
# Without it, it will default to the number of CPU cores, which can be a
|
||||||
|
# problem on low-memory systems.
|
||||||
$(TOOLS): | build deps
|
$(TOOLS): | build deps
|
||||||
for D in $(TOOLS_DIRS); do [ -e "$${D}/$@.nim" ] && TOOL_DIR="$${D}" && break; done && \
|
+ for D in $(TOOLS_DIRS); do [ -e "$${D}/$@.nim" ] && TOOL_DIR="$${D}" && break; done && \
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim c -o:build/$@ $(NIM_PARAMS) "$${TOOL_DIR}/$@.nim" && \
|
$(ENV_SCRIPT) nim c -o:build/$@ $(NIM_PARAMS) "$${TOOL_DIR}/$@.nim" && \
|
||||||
echo -e "Build completed successfully"
|
echo -e "Build completed successfully"
|
||||||
@ -319,11 +323,11 @@ clean-pyrmont:
|
|||||||
|
|
||||||
ctail: | build deps
|
ctail: | build deps
|
||||||
mkdir -p vendor/.nimble/bin/
|
mkdir -p vendor/.nimble/bin/
|
||||||
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim
|
+ $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim
|
||||||
|
|
||||||
ntu: | build deps
|
ntu: | build deps
|
||||||
mkdir -p vendor/.nimble/bin/
|
mkdir -p vendor/.nimble/bin/
|
||||||
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim
|
+ $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim
|
||||||
|
|
||||||
clean: | clean-common
|
clean: | clean-common
|
||||||
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,nimbus_beacon_node*,beacon_node_*,block_sim,state_sim,transition*}
|
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,nimbus_beacon_node*,beacon_node_*,block_sim,state_sim,transition*}
|
||||||
@ -332,13 +336,13 @@ ifneq ($(USE_LIBBACKTRACE), 0)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
libnfuzz.so: | build deps
|
libnfuzz.so: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
+ 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 && \
|
$(ENV_SCRIPT) nim c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
|
||||||
rm -f build/$@ && \
|
rm -f build/$@ && \
|
||||||
ln -s $@.0 build/$@
|
ln -s $@.0 build/$@
|
||||||
|
|
||||||
libnfuzz.a: | build deps
|
libnfuzz.a: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
+ echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
rm -f build/$@ && \
|
rm -f build/$@ && \
|
||||||
$(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
|
$(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
|
||||||
[[ -e "$@" ]] && mv "$@" build/ || true # workaround for https://github.com/nim-lang/Nim/issues/12745
|
[[ -e "$@" ]] && mv "$@" build/ || true # workaround for https://github.com/nim-lang/Nim/issues/12745
|
||||||
|
Loading…
x
Reference in New Issue
Block a user