Skip to content

Commit f499ea0

Browse files
dcpleungdkalowsk
authored andcommitted
cmake: apply optimization flags to assembler
Commit 65471a6 separated compiler flags into ASM, C and CXX as those flags may not be universal to both assembler and compiler. Though, with that separation, the assembler no longer gets the optimization flags (e.g. speed/size optimizations). So adds this back so the assembler can optimize the code if it chooses to. For example, some instructions can be fused together to result in small code. Fixes #92439 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent 8a565c0 commit f499ea0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ SOC_* symbol.")
245245
endif()
246246

247247
# Apply the final optimization flag(s)
248+
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${OPTIMIZATION_FLAG}>)
248249
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${OPTIMIZATION_FLAG}>)
249250
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${OPTIMIZATION_FLAG}>)
250251

0 commit comments

Comments
 (0)