Skip to content

Commit

Permalink
Enable libc++ bound checks (#6767)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtropets authored Jan 17, 2025
1 parent 9d115ef commit 516b158
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmake/ccf_app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ message(STATUS "Compile target platform: ${COMPILE_TARGET}")
if(USE_LIBCXX)
list(APPEND COMPILE_LIBCXX -stdlib=libc++)
list(APPEND LINK_LIBCXX -lc++ -lc++abi -stdlib=libc++)

if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_compile_options(-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG)
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
add_compile_options(-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST)
endif()

endif()

# Enclave library wrapper
Expand Down

0 comments on commit 516b158

Please sign in to comment.