Skip to content

Commit

Permalink
selectively depend on rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Jun 4, 2024
1 parent 3899226 commit 25b0540
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ ifneq ($(USE_LIBBACKTRACE), 0)
deps: | libbacktrace
endif

ifneq ($(USE_SYSTEM_ROCKSDB), 0)
deps: | rocksdb
endif

ifneq ($(ENABLE_EVMC), 0)
NIM_PARAMS += -d:evmc_enabled
T8N_PARAMS := -d:chronicles_enabled=off
Expand Down Expand Up @@ -213,15 +209,10 @@ $(TOOLS): | build deps
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -o:build/$@ "$${TOOL_DIR}/$@.nim"

# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
nimbus: | build deps
nimbus: | build deps rocksdb
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "nimbus/$@.nim"

nimbus_rocksdb_static: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:enable_rocksdb_static_linking -d:chronicles_log_level=TRACE \
-o:build/$@ "nimbus/nimbus.nim"

# symlink
nimbus.nims:
ln -s nimbus.nimble $@
Expand All @@ -232,20 +223,24 @@ libbacktrace:

# nim-rocksdb

ifneq ($(USE_SYSTEM_ROCKSDB), 0)
ifeq ($(OS), Windows_NT)
rocksdb: fetch-dlls
else
rocksdb:
+ vendor/nim-rocksdb/scripts/build_static_deps.sh
endif
else
rocksdb:
endif

# builds and runs the nimbus test suite
test: | build deps
test: | build deps rocksdb
$(ENV_SCRIPT) nim test_rocksdb $(NIM_PARAMS) nimbus.nims
$(ENV_SCRIPT) nim test $(NIM_PARAMS) nimbus.nims

# builds and runs an EVM-related subset of the nimbus test suite
test-evm: | build deps
test-evm: | build deps rocksdb
$(ENV_SCRIPT) nim test_evm $(NIM_PARAMS) nimbus.nims

# Primitive reproducibility test.
Expand Down Expand Up @@ -343,7 +338,7 @@ t8n_test: | build deps t8n
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_default_output_device=stderr "tools/t8n/$@.nim"

# builds evm state test tool
evmstate: | build deps
evmstate: | build deps rocksdb
$(ENV_SCRIPT) nim c $(NIM_PARAMS) "tools/evmstate/$@.nim"

# builds and runs evm state tool test suite
Expand Down

0 comments on commit 25b0540

Please sign in to comment.