@@ -25,15 +25,20 @@ add_library(enclave_trusted SHARED ${SOURCES})
25
25
if ("$ENV{MODE} " STREQUAL "SIMULATE" )
26
26
target_compile_definitions (enclave_trusted PUBLIC -DSIMULATE )
27
27
endif ()
28
-
29
28
if ("$ENV{DEBUG} " EQUAL 1 )
30
- target_compile_options (enclave_trusted PUBLIC -g -O0 )
31
- target_compile_definitions (enclave_trusted PUBLIC -DDEBUG )
29
+ target_compile_definitions (enclave_trusted PRIVATE DEBUG )
30
+ target_compile_options (enclave_trusted PRIVATE -g -O0 )
31
+ else ()
32
+ target_compile_options (enclave_trusted PRIVATE -O3 )
32
33
endif ()
33
34
34
35
add_compile_options (${COMMON_COMPILE_FLAGS} -fvisibility=hidden -fpie -fstack-protector -Wno-unused-parameter -Wno-unused-variable -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-pie -Wl,--export-dynamic -Wl,--defsym,__ImageBase=0 )
36
+
35
37
target_compile_definitions (enclave_trusted PUBLIC OE_API_VERSION=2 )
36
- set_target_properties (enclave_trusted PROPERTIES POSITION_INDEPENDENT_CODE OFF )
38
+
39
+ set_target_properties (enclave_trusted
40
+ PROPERTIES
41
+ POSITION_INDEPENDENT_CODE OFF )
37
42
38
43
########## Fetch and make mc2-utils library available ##########
39
44
include (FetchContent )
0 commit comments