diff --git a/arch/risc-v/src/cmake/Toolchain.cmake b/arch/risc-v/src/cmake/Toolchain.cmake index 3bc71ce57f3d8..f9ebc58cc902d 100644 --- a/arch/risc-v/src/cmake/Toolchain.cmake +++ b/arch/risc-v/src/cmake/Toolchain.cmake @@ -110,6 +110,14 @@ endif() set(NO_LTO "-fno-lto") +# override the responsible file flag + +if(CMAKE_GENERATOR MATCHES "Ninja") + set(CMAKE_C_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") + set(CMAKE_CXX_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") + set(CMAKE_ASM_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @") +endif() + # override the ARCHIVE command set(CMAKE_ARCHIVE_COMMAND " rcs ") set(CMAKE_RANLIB_COMMAND " ")