<div dir="ltr">Dear All,<div><br></div><div>I'm currently using CMake-3.7.1 to build a big project with different TI compilers (cl6x, armcl, cl-arp32)  and since several months ago I started to use linker response files because the linker command line was too long for Windows and the build was failing.</div><div><br></div><div>When I tried to do this for the first time I got a linker error with an invalid flag being used, as the TI linker doesn't support response files (-@)</div><div><br></div><div>The way CMake invokes the TI linker is as mentioned in the TI documentation by invoking the compiler with an option to run the linker, i.e. cl6x --run_linker [options] filename1, ..., filenameN, in TI-CXX.cmake:</div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_CXX_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")<br></div></blockquote><br>The solution that I found was to change the order of the arguments passed to the linker, because the TI compiler supports response files (-@) and it passes that information to the linker, so by moving <OBJECTS> before --run_linker the problem was solved:</div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <OBJECTS> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_CXX_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS>")<br></div></blockquote><br></div><div>The same change is needed in TI-C.cmake</div><div><br></div><div>This issue is present since at least since CMake-3.3.2</div><div><br></div><div>Regards,</div><div>Arturo</div><div><br></div></div>