Some attempts, trying to decipher the Ninja generator code. I believe the core problem is in IsIdentChar() that do not recognize '@' (as well as =,% and others?). The Ninja generator then uses EncodeIdent() to encode the filenames like $identNN. This would be OK if not the command line length calculation calculated the length of without expansion, which happens to be below 8192 bytes on Windows(CMD limitation). The problem is therefore not related to ARMCC (other compilers worked, the command line were longer than 8192 still).
A response file should be used if the command is considered longer than the limit but operates on arguments after encoding (need to get the expanded size). I opened an issue: https://gitlab.kitware.com/cmake/cmake/issues/18075 -- It is possible to force response files SET( CMAKE_NINJA_FORCE_RESPONSE_FILE 1 ) A related question: http://cmake.3232098.n2.nabble.com/Problem-with-forced-response-files-Ninja-tt7596540.html There are two problems with this approach: * The file flag is incorrect, the following variables are not picked up: SET( CMAKE_C_RESPONSE_FILE_FLAG "--via=" ) SET( CMAKE_ASM_RESPONSE_FILE_FLAG "--via=" ) * The contents in the response file includes definitions (hardcoded in Ninja generator), should not be included for armasm no <DEFINES> in: set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>") -- Patching the generated Ninja files seem to be the easiest way forward. /Gerhard 2018-06-05 16:31 GMT+02:00 Gerhard Olsson <gerhard.nos...@gmail.com>: > The following occurs with CMake on Windows, crosscompiling with ARMCC. > > If the path contains "@", CMake ignores response file in the toolchain > file: > SET( CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1 ) > > The linker command is too long and fails. > > The command is run in Jenkins, I have not seen a way to avoid generating @ > in the path > A workaround could be to patch rules.ninja to add the rsp_file handling if > missing. > > Any configuration changes that resolves the problem? > Any hints how to debug and fix CMake for this? > > /Gerhard > >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake