Skip to content

Commit

Permalink
Fix build for SGX_DEBUG=1
Browse files Browse the repository at this point in the history
Use cargo --release also in case of SGX_DEBUG=1 and hence also the corresponding target/release folder. Closes #375
  • Loading branch information
Felix Müller committed Sep 23, 2021
1 parent 1181835 commit 958e307
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions enclave-runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 958e307

Please sign in to comment.