Skip to content

Commit 3265f2d

Browse files
committed
cmake: build Saigo arm nexe with -O0 to avoid a bug
1 parent 8cc5260 commit 3265f2d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

cmake/DaemonFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,17 @@ else()
231231
endif()
232232
endif()
233233

234+
if (NACL AND USE_NACL_SAIGO AND SAIGO_ARCH STREQUAL "arm")
235+
# This should be set for every build type because build type flags
236+
# are set after the other custom flags and then have the last word.
237+
# DEBUG should already use -O0 anyway.
238+
# See: https://github.com/Unvanquished/Unvanquished/issues/3297
239+
set_c_cxx_flag("-O0" DEBUG)
240+
set_c_cxx_flag("-O0" RELEASE)
241+
set_c_cxx_flag("-O0" RELWITHDEBINFO)
242+
set_c_cxx_flag("-O0" MINSIZEREL)
243+
endif()
244+
234245
# Extra debug flags.
235246
set_c_cxx_flag("-g3" RELWITHDEBINFO)
236247
set_c_cxx_flag("-g3" DEBUG)

0 commit comments

Comments
 (0)