m4sterchain commented on code in PR #232: URL: https://github.com/apache/teaclave-trustzone-sdk/pull/232#discussion_r2366480630
########## examples/acipher-rs/ta/Makefile: ########## @@ -24,23 +24,24 @@ OBJCOPY := $(CROSS_COMPILE)objcopy LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" # fix for the error: "unwinding panics are not supported without std" reported by clippy -# Only set panic=abort when STD is not enabled (no-std mode) -RUSTFLAGS := $(if $(STD),,-C panic=abort) +# Set panic=abort for std and no-std +RUSTFLAGS := -C panic=abort TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py OUT_DIR := $(CURDIR)/target/$(TARGET)/release BUILDER ?= $(if $(STD),xargo,cargo) +FEATURES := $(if $(STD),--features std,) Review Comment: We should avoid using STD env in the TA Makefile - in legacy building system, the STD is a env variable used for setup the target envs. - in docker building system, there is no STD env variable exist, as we use env files to setup the target envs. The design principle for the makefile is using the caller provided variable, e.g. passing caller provided FEATURES to cargo, instead of defining FEATURES conditionally; similar as TARGET, CROSS_COMPILE. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
