Skip to content

Commit

Permalink
Fix _FORTIFY_SOURCE warning treated as error
Browse files Browse the repository at this point in the history
This commit adds -O3 to the CMakeLists.txt of the omrtrace component to
prevent the following warning treated as an error:

warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Signed-off-by: Irwin D'Souza <[email protected]>
  • Loading branch information
dsouzai committed Sep 12, 2022
1 parent e14a8ec commit a44356c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions omrtrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ omr_add_library(omrtrace STATIC
# to implement variable length structs
if (OMR_STRNCPY_FORTIFY_OPTIONS)
target_compile_options(omrtrace PRIVATE ${OMR_STRNCPY_FORTIFY_OPTIONS})
if (OMR_OS_LINUX)
target_compile_options(omrtrace PRIVATE -O3)
endif()
endif()

target_link_libraries(omrtrace
Expand Down

0 comments on commit a44356c

Please sign in to comment.