Skip to content

Commit

Permalink
build: use makefile fortify flags in idf cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
greenaddress committed Sep 21, 2024
1 parent 37ba786 commit 1a26eb2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/libwally-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ set_source_files_properties(
PROPERTIES COMPILE_FLAGS
"-Wno-nonnull-compare -Wno-unused-function -Wno-error=maybe-uninitialized -Wno-type-limits -Wno-error=array-parameter"
)

# fortify/performance flags
target_compile_definitions(${COMPONENT_TARGET} PUBLIC NDEBUG=1)
target_compile_options(${COMPONENT_TARGET} PUBLIC "-fstack-protector-strong")
target_link_options(${COMPONENT_TARGET} PUBLIC -Wl,-z,relro -Wl,-z,now)
target_compile_definitions(${COMPONENT_TARGET} PUBLIC _FORTIFY_SOURCE=2)

target_compile_definitions(${COMPONENT_TARGET} PUBLIC "-DBUILD_ELEMENTS=1")
target_compile_definitions(${COMPONENT_TARGET} PUBLIC "-DBUILD_MINIMAL=1")
target_compile_definitions(${COMPONENT_TARGET} PUBLIC "-DHAVE_MBEDTLS_SHA256_H")
Expand Down

0 comments on commit 1a26eb2

Please sign in to comment.