Skip to content

Commit 2a9be50

Browse files
LoveKarlssondkalowsk
authored andcommitted
toolchain: compiler: IAR does not allow vla with C++
Fixed a problem where the command line option --vla was used with C++ causing a command line error in the IAR ICCARM compiler. Signed-off-by: Lars-Ove Karlsson <[email protected]>
1 parent 970c715 commit 2a9be50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/compiler/iar/target.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ endif()
8686

8787
# Enable VLA if CONFIG_MISRA_SANE is not set and warnings are not enabled.
8888
if(NOT CONFIG_MISRA_SANE AND NOT DEFINED W)
89-
list(APPEND IAR_COMMON_FLAGS --vla)
89+
list(APPEND IAR_COMMON_FLAGS $<$<COMPILE_LANGUAGE:C>:--vla>)
9090
endif()
9191

9292
# Minimal ASM compiler flags

0 commit comments

Comments
 (0)