refactor: extract op-reth binary to separate crate (#10641)

Co-authored-by: Loocapro <lucaprovini1989@gmail.com>
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
Arsenii Kulikov
2024-09-02 18:20:15 +04:00
committed by GitHub
parent 5b97ace992
commit fcab695a93
24 changed files with 249 additions and 260 deletions

View File

@ -52,7 +52,7 @@ install: ## Build and install the reth binary under `~/.cargo/bin`.
.PHONY: install-op
install-op: ## Build and install the op-reth binary under `~/.cargo/bin`.
cargo install --path bin/reth --bin op-reth --force --locked \
cargo install --path crates/optimism/bin --bin op-reth --force --locked \
--features "optimism,$(FEATURES)" \
--profile "$(PROFILE)" \
$(CARGO_INSTALL_EXTRA_FLAGS)
@ -67,14 +67,14 @@ build-debug: ## Build the reth binary into `target/debug` directory.
.PHONY: build-op
build-op: ## Build the op-reth binary into `target` directory.
cargo build --bin op-reth --features "optimism,$(FEATURES)" --profile "$(PROFILE)"
cargo build --bin op-reth --features "optimism,$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
# Builds the reth binary natively.
build-native-%:
cargo build --bin reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)"
op-build-native-%:
cargo build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)"
cargo build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
# The following commands use `cross` to build a cross-compile.
#
@ -106,7 +106,7 @@ build-%:
op-build-%:
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \
cross build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)"
cross build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
# Unfortunately we can't easily use cross to build for Darwin because of licensing issues.
# If we wanted to, we would need to build a custom Docker image with the SDK available.
@ -314,7 +314,7 @@ maxperf: ## Builds `reth` with the most aggressive optimisations.
.PHONY: maxperf-op
maxperf-op: ## Builds `op-reth` with the most aggressive optimisations.
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak,optimism --bin op-reth
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak,optimism --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml
.PHONY: maxperf-no-asm
maxperf-no-asm: ## Builds `reth` with the most aggressive optimisations, minus the "asm-keccak" feature.