Skip to content

Commit

Permalink
Set rust optimizations to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht9277 committed Nov 4, 2024
1 parent 2ebf0a0 commit 5c6e51a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/aligned_base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef

FROM chef AS planner

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

# build_sp1_linux
COPY operator/sp1/lib/Cargo.toml /aligned_layer/operator/sp1/lib/Cargo.toml
COPY operator/sp1/lib/src/ /aligned_layer/operator/sp1/lib/src/
Expand Down Expand Up @@ -73,6 +75,8 @@ RUN cargo chef prepare --recipe-path /aligned_layer/operator/merkle_tree/lib/rec

FROM chef AS chef_builder

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

COPY batcher/aligned-sdk /aligned_layer/batcher/aligned-sdk/

# build_sp1_linux
Expand Down Expand Up @@ -107,6 +111,8 @@ RUN cargo chef cook --release --recipe-path /aligned_layer/operator/merkle_tree/

FROM base AS builder

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

ENV RELEASE_FLAG=--release
ENV TARGET_REL_PATH=release
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
Expand Down
8 changes: 8 additions & 0 deletions docker/batcher.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef

FROM chef AS planner

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

COPY batcher/aligned-batcher/Cargo.toml /aligned_layer/batcher/aligned-batcher/Cargo.toml
COPY batcher/aligned-batcher/src/main.rs /aligned_layer/batcher/aligned-batcher/src/main.rs
WORKDIR /aligned_layer/batcher/aligned-batcher/
Expand All @@ -22,6 +24,9 @@ WORKDIR /aligned_layer/batcher/aligned/
RUN cargo chef prepare --recipe-path /aligned_layer/batcher/aligned/recipe.json

FROM chef AS chef_builder

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

COPY batcher/aligned-sdk/ /aligned_layer/batcher/aligned-sdk/

COPY --from=planner /aligned_layer/batcher/aligned-batcher/recipe.json /aligned_layer/batcher/aligned-batcher/recipe.json
Expand All @@ -33,6 +38,9 @@ WORKDIR /aligned_layer/batcher/aligned/
RUN cargo chef cook --release --recipe-path /aligned_layer/batcher/aligned/recipe.json

FROM base AS builder

ENV RUSTFLAGS="-C codegen-units=256 -C incremental=true -C opt-level=0"

COPY . /aligned_layer/

COPY --from=chef_builder /aligned_layer/batcher/aligned-batcher/target/ /aligned_layer/batcher/aligned-batcher/target/
Expand Down

0 comments on commit 5c6e51a

Please sign in to comment.