mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +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:
@@ -35,9 +35,5 @@ px4_add_library(drivers_accelerometer
|
||||
PX4Accelerometer.cpp
|
||||
PX4Accelerometer.hpp
|
||||
)
|
||||
target_link_libraries(drivers_accelerometer
|
||||
PRIVATE
|
||||
conversion
|
||||
drivers__device
|
||||
mathlib
|
||||
)
|
||||
target_compile_options(drivers_accelerometer PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
target_link_libraries(drivers_accelerometer PRIVATE conversion drivers__device)
|
||||
|
||||
@@ -35,4 +35,5 @@ px4_add_library(drivers_gyroscope
|
||||
PX4Gyroscope.cpp
|
||||
PX4Gyroscope.hpp
|
||||
)
|
||||
target_compile_options(drivers_gyroscope PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
target_link_libraries(drivers_gyroscope PRIVATE conversion drivers__device)
|
||||
|
||||
@@ -32,4 +32,5 @@
|
||||
############################################################################
|
||||
|
||||
add_library(perf perf_counter.cpp)
|
||||
add_dependencies(perf prebuild_targets)
|
||||
add_dependencies(perf prebuild_targets)
|
||||
target_compile_options(perf PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
|
||||
@@ -33,13 +33,17 @@
|
||||
|
||||
set(SRCS
|
||||
conversions.c
|
||||
conversions.h
|
||||
crc.c
|
||||
crc.h
|
||||
mavlink_log.cpp
|
||||
mavlink_log.h
|
||||
)
|
||||
|
||||
if(${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
list(APPEND SRCS
|
||||
cpuload.c
|
||||
cpuload.h
|
||||
print_load_nuttx.c
|
||||
otp.c
|
||||
)
|
||||
@@ -50,3 +54,4 @@ else()
|
||||
endif()
|
||||
|
||||
px4_add_library(systemlib ${SRCS})
|
||||
target_compile_options(systemlib PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||
|
||||
Reference in New Issue
Block a user