diff --git a/CMakeLists.txt b/CMakeLists.txt index bbe0c457983..f0583b80dda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,7 +339,7 @@ if(NOT CONFIG_NATIVE_APPLICATION) toolchain_ld_baremetal() endif() -if(NOT CONFIG_MINIMAL_LIBCPP) +if(CONFIG_CPP AND NOT CONFIG_MINIMAL_LIBCPP) # @Intent: Set linker specific flags for C++ toolchain_ld_cpp() endif()