-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udpate changelog, update makefile allow lambda to be build with x86
- Loading branch information
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
FUNCTIONS := handler | ||
LAMBDA_NAME := coralogix-aws-shipper | ||
ARCH := $(or ${RUST_ARCH},arm64) | ||
ARCH_SPLIT = $(subst -, ,$(ARCH)) | ||
|
||
# build-%: | ||
# cargo lambda build --release --${ARCH} | ||
# @mkdir -p $(ARTIFACTS_DIR) | ||
# @cp -v ./target/lambda/${LAMBDA_NAME}/bootstrap $(ARTIFACTS_DIR) | ||
# set +xv | ||
# Determine the target based on the architecture | ||
ifeq ($(ARCH),arm64) | ||
TARGET_ARCH := aarch64-unknown-linux-gnu.2.17 | ||
else ifeq ($(ARCH),x86-64) | ||
TARGET_ARCH := x86_64-unknown-linux-gnu.2.17 | ||
else | ||
$(error Unsupported architecture: $(ARCH)) | ||
endif | ||
|
||
build-LambdaFunction: | ||
cargo lambda build --release --target aarch64-unknown-linux-gnu.2.17 | ||
cp ./target/lambda/coralogix-aws-shipper/bootstrap $(ARTIFACTS_DIR) | ||
cargo lambda build --release --target $(TARGET_ARCH) | ||
@mkdir -p $(ARTIFACTS_DIR) | ||
cp ./target/lambda/$(LAMBDA_NAME)/bootstrap $(ARTIFACTS_DIR) | ||
|
||
delete: | ||
sam delete | ||
sam delete |