File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed
lambda-directly-optimized Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,8 @@ COPY src/main.rs /dist/apollo-router-lambda/src/main.rs
4444
4545# Build our lambda bootstrap binary. The release artifact can be found at:
4646# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
47- RUN export PATH="$HOME/.cargo/bin:$PATH"; export RUSTFLAGS="-Zlocation-detail=none -Zthreads=8"; cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
47+ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
48+ export RUSTFLAGS="-Zlocation-detail=none -Zthreads=8"; \
49+ # Delete the previously generated main.rs artifacts.
50+ rm -r target/$TARGET/release/deps/apollo_router_lambda*; \
51+ cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
Original file line number Diff line number Diff line change @@ -54,4 +54,8 @@ COPY src/main.rs /dist/apollo-router-lambda/src/main.rs
5454# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
5555# NOTE: We add additional ARM/Graviton2 specific flags to the build process. See more at
5656# https://github.com/aws/aws-graviton-getting-started/blob/main/rust.md.
57- RUN export PATH="$HOME/.cargo/bin:$PATH"; export RUSTFLAGS="-Ctarget-feature=+lse -Ctarget-cpu=neoverse-n1 -Zlocation-detail=none -Zthreads=8"; cat src/main.rs; cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
57+ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
58+ export RUSTFLAGS="-Ctarget-feature=+lse -Ctarget-cpu=neoverse-n1 -Zlocation-detail=none -Zthreads=8"; \
59+ # Delete the previously generated main.rs artifacts.
60+ rm -r target/$TARGET/release/deps/apollo_router_lambda*; \
61+ cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
Original file line number Diff line number Diff line change @@ -54,4 +54,6 @@ COPY src/main.rs /dist/apollo-router-lambda/src/main.rs
5454# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
5555RUN export PATH="$HOME/.cargo/bin:$PATH"; \
5656 export RUSTFLAGS="-Zlocation-detail=none -Zthreads=8"; \
57+ # Delete the previously generated main.rs artifacts.
58+ rm -r target/$TARGET/release/deps/apollo_router_lambda*; \
5759 cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
Original file line number Diff line number Diff line change @@ -48,4 +48,7 @@ COPY src/main.rs /dist/apollo-router-lambda/src/main.rs
4848
4949# Build our lambda bootstrap binary. The release artifact can be found at:
5050# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
51- RUN export PATH="$HOME/.cargo/bin:$PATH" ; cargo lambda build --compiler cargo --release
51+ RUN export PATH="$HOME/.cargo/bin:$PATH" ; \
52+ # Delete the previously generated main.rs artifacts.
53+ rm -r target/x86_64-unknown-linux-gnu/release/deps/apollo_router_lambda*; \
54+ cargo lambda build --compiler cargo --release
Original file line number Diff line number Diff line change @@ -48,4 +48,7 @@ COPY src/main.rs /dist/apollo-router-lambda/src/main.rs
4848
4949# Build our lambda bootstrap binary. The release artifact can be found at:
5050# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
51- RUN export PATH="$HOME/.cargo/bin:$PATH" ; cargo lambda build --compiler cargo --release
51+ RUN export PATH="$HOME/.cargo/bin:$PATH" ; \
52+ # Delete the previously generated main.rs artifacts.
53+ rm -r target/x86_64-unknown-linux-gnu/release/deps/apollo_router_lambda*; \
54+ cargo lambda build --compiler cargo --release
You can’t perform that action at this time.
0 commit comments