Remove size optimization for individual modules

It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
This commit is contained in:
Julian Oes
2016-09-30 08:11:51 +02:00
committed by Beat Küng
parent aa6d9e363f
commit 8ff237c69f
145 changed files with 154 additions and 283 deletions
+1 -2
View File
@@ -33,10 +33,9 @@
px4_add_module(
MODULE platforms__nuttx
COMPILE_FLAGS
-Os
SRCS
px4_nuttx_impl.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
+1 -2
View File
@@ -33,11 +33,10 @@
px4_add_module(
MODULE platforms__nuttx__px4_layer
COMPILE_FLAGS
-Os
SRCS
px4_nuttx_tasks.c
../../posix/px4_layer/px4_log.c
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,7 +34,6 @@ px4_add_module(
MODULE platforms__posix__drivers__adcsim
MAIN adcsim
COMPILE_FLAGS
-Os
SRCS
adcsim.cpp
DEPENDS
@@ -47,4 +46,4 @@ target_link_libraries(platforms__posix__drivers__adcsim
df_driver_framework
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,11 +34,10 @@ px4_add_module(
MODULE platforms__posix__drivers__airspeedsim
MAIN measairspeedsim
COMPILE_FLAGS
-Os
SRCS
airspeedsim.cpp
meas_airspeed_sim.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,10 +34,9 @@ px4_add_module(
MODULE platforms__posix__drivers__barosim
MAIN barosim
COMPILE_FLAGS
-Os
SRCS
baro.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,10 +34,9 @@ px4_add_module(
MODULE platforms__posix__drivers__gpssim
MAIN gpssim
COMPILE_FLAGS
-Os
SRCS
gpssim.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -35,7 +35,6 @@ px4_add_module(
MAIN gyrosim
STACK_MAIN 1200
COMPILE_FLAGS
-Os
SRCS
gyrosim.cpp
DEPENDS
@@ -48,4 +47,4 @@ target_link_libraries(platforms__posix__drivers__gyrosim
df_driver_framework
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -33,10 +33,9 @@
px4_add_module(
MODULE platforms__posix__drivers__ledsim
COMPILE_FLAGS
-Os
SRCS
led.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,10 +34,9 @@ px4_add_module(
MODULE platforms__posix__drivers__rgbledsim
MAIN rgbledsim
COMPILE_FLAGS
-Os
SRCS
rgbled.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -34,10 +34,9 @@ px4_add_module(
MODULE platforms__posix__drivers__tonealrmsim
MAIN tone_alarm
COMPILE_FLAGS
-Os
SRCS
tone_alarm.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -47,7 +47,6 @@ endif()
px4_add_module(
MODULE platforms__posix__px4_layer
COMPILE_FLAGS
-Os
SRCS
px4_posix_impl.cpp
px4_posix_tasks.cpp
@@ -33,7 +33,6 @@
px4_add_module(
MODULE platforms__posix__work_queue
COMPILE_FLAGS
-Os
SRCS
hrt_thread.c
hrt_queue.c
@@ -52,4 +51,4 @@ px4_add_module(
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -31,7 +31,7 @@
#
############################################################################
set(TOOLS_ERROR_MSG
set(TOOLS_ERROR_MSG
"The FC_ADDON must be installed and the environment variable FC_ADDON must be set"
"(e.g. export FC_ADDON=${HOME}/Qualcomm/addon)")
@@ -53,7 +53,7 @@ px4_add_module(
MAIN mpu9x50
STACK_MAIN 1200
COMPILE_FLAGS
-Os -Weffc++
-Weffc++
SRCS
mpu9x50_main.cpp
mpu9x50_params.c
@@ -61,10 +61,10 @@ px4_add_module(
platforms__common
)
set(module_external_libraries
set(module_external_libraries
${module_external_libraries}
libmpu9x50
CACHE INTERNAL "module_external_libraries"
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -31,7 +31,7 @@
#
############################################################################
set(TOOLS_ERROR_MSG
set(TOOLS_ERROR_MSG
"The FC_ADDON must be installed and the environment variable FC_ADDON must be set"
"(e.g. export FC_ADDON=${HOME}/Qualcomm/addon)")
@@ -53,7 +53,7 @@ px4_add_module(
MAIN rc_receiver
STACK_MAIN 1200
COMPILE_FLAGS
-Os -Weffc++
-Weffc++
SRCS
rc_receiver_main.cpp
rc_receiver_params.c
@@ -62,10 +62,10 @@ px4_add_module(
platforms__common
)
set(module_external_libraries
set(module_external_libraries
${module_external_libraries}
librc_receiver
CACHE INTERNAL "module_external_libraries"
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -31,7 +31,7 @@
#
############################################################################
set(TOOLS_ERROR_MSG
set(TOOLS_ERROR_MSG
"The FC_ADDON must be installed and the environment variable FC_ADDON must be set"
"(e.g. export FC_ADDON=${HOME}/Qualcomm/addon)")
@@ -53,7 +53,7 @@ px4_add_module(
MAIN uart_esc
STACK_MAIN 1200
COMPILE_FLAGS
-Os -Weffc++
-Weffc++
SRCS
uart_esc_main.cpp
uart_esc_params.c
@@ -62,10 +62,10 @@ px4_add_module(
platforms__common
)
set(module_external_libraries
set(module_external_libraries
${module_external_libraries}
libuart_esc
libuart_esc
CACHE INTERNAL "module_external_libraries"
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -56,7 +56,6 @@ endif()
px4_add_module(
MODULE platforms__qurt__px4_layer
COMPILE_FLAGS
-Os
SRCS
${QURT_LAYER_SRCS}
${CONFIG_SRC}