Skip to content

Commit

Permalink
build: disable strict-aliasing
Browse files Browse the repository at this point in the history
Build fail with old version of gcc when use -Os

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 6, 2023
1 parent e65f96f commit b5b1018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (NOT LUA53_INCLUDE_DIRS OR NOT LUA53_LIBRARIES)
message(FATAL_ERROR "Liblua 5.3 is required.")
endif()

add_compile_options(-D_GNU_SOURCE -Os -Wall -Werror --std=gnu99)
add_compile_options(-D_GNU_SOURCE -Os -Wall -Werror --std=gnu99 -fno-strict-aliasing)

# configure a header file to pass some of the CMake settings to the source code
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
Expand Down

0 comments on commit b5b1018

Please sign in to comment.