mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:03:34 +08:00
selectively increase optimization -Os -> -O2
- targetted at modules/libraries that benefit without drastically increasing flash usage - ignored on boards with CONSTRAINED_FLASH set
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
# skip for px4_layer support on an IO board
|
||||
if (NOT ${PX4_BOARD} MATCHES "px4_io")
|
||||
if(NOT PX4_BOARD MATCHES "px4_io")
|
||||
|
||||
add_library(px4_layer
|
||||
board_crashdump.c
|
||||
|
||||
@@ -34,3 +34,4 @@
|
||||
px4_add_library(arch_dshot
|
||||
dshot.c
|
||||
)
|
||||
target_compile_options(arch_dshot PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
|
||||
@@ -34,5 +34,8 @@
|
||||
px4_add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align) # TODO: fix and enable
|
||||
|
||||
target_compile_options(arch_hrt
|
||||
PRIVATE
|
||||
${MAX_CUSTOM_OPT_LEVEL}
|
||||
-Wno-cast-align # TODO: fix and enable
|
||||
)
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_io_pins
|
||||
input_capture.c
|
||||
io_timer.c
|
||||
pwm_servo.c
|
||||
pwm_trigger.c
|
||||
input_capture.c
|
||||
)
|
||||
target_compile_options(arch_io_pins PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
|
||||
@@ -34,3 +34,4 @@
|
||||
px4_add_library(arch_spi
|
||||
spi.cpp
|
||||
)
|
||||
target_compile_options(arch_spi PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
|
||||
Reference in New Issue
Block a user