diff --git a/Makefile b/Makefile index 82aa4946d7..535ac7b599 100755 --- a/Makefile +++ b/Makefile @@ -57,9 +57,11 @@ endif endif ifeq ($(SGX_DEBUG), 1) + # we build with cargo --release, even in SGX DEBUG mode SGX_COMMON_CFLAGS += -O0 -g -ggdb - OUTPUT_PATH := debug - CARGO_TARGET := + # cargo sets this automatically, cannot use 'debug' + OUTPUT_PATH := release + CARGO_TARGET := --release else SGX_COMMON_CFLAGS += -O2 OUTPUT_PATH := release diff --git a/enclave-runtime/Makefile b/enclave-runtime/Makefile index 7fab8f1a00..bf32083e5d 100644 --- a/enclave-runtime/Makefile +++ b/enclave-runtime/Makefile @@ -31,8 +31,8 @@ Rust_Enclave_Files := $(wildcard src/*.rs) $(wildcard ../stf/src/*.rs) Rust_Target_Path := $(CURDIR)/../../../xargo ifeq ($(SGX_DEBUG), 1) - OUTPUT_PATH := debug - CARGO_TARGET := + OUTPUT_PATH := release + CARGO_TARGET := --release else OUTPUT_PATH := release CARGO_TARGET := --release