diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index fa34b1584d..1e681d98a0 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -530,14 +530,14 @@ function(px4_add_common_flags) ) endif() - set(max_optimization -Os) + set(max_optimization -O1) set(optimization_flags -fno-strict-aliasing - -fomit-frame-pointer -funsafe-math-optimizations -ffunction-sections -fdata-sections + -g -fsanitize=address -fno-omit-frame-pointer ) if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")