From 2a9be50c29dfea7c2a8019c7a8a4d7ff8448e019 Mon Sep 17 00:00:00 2001 From: Lars-Ove Karlsson Date: Tue, 1 Jul 2025 15:01:06 +0200 Subject: [PATCH] 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 --- cmake/compiler/iar/target.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/compiler/iar/target.cmake b/cmake/compiler/iar/target.cmake index 432c1238b70..9cf625ce3b9 100644 --- a/cmake/compiler/iar/target.cmake +++ b/cmake/compiler/iar/target.cmake @@ -86,7 +86,7 @@ endif() # Enable VLA if CONFIG_MISRA_SANE is not set and warnings are not enabled. if(NOT CONFIG_MISRA_SANE AND NOT DEFINED W) - list(APPEND IAR_COMMON_FLAGS --vla) + list(APPEND IAR_COMMON_FLAGS $<$:--vla>) endif() # Minimal ASM compiler flags