Skip to content

Commit 98fea82

Browse files
committed
Compiler/TI: Avoid response file usage for linker
The object and library files have to be listed after the `--run-linker` flag. But after this flag the `--cmd_file` flag for response files cannot be used any more. Putting the whole command line into a response file would work, but this is not supported by CMake (yet).
1 parent 5dec322 commit 98fea82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Modules/Compiler/TI.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ macro(__compiler_ti lang)
1515
endif()
1616

1717
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "--cmd_file=")
18-
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG " ")
1918

2019
set(CMAKE_INCLUDE_FLAG_${lang} "--include_path=")
2120
set(CMAKE_DEPFILE_FLAGS_${lang} "--preproc_with_compile --preproc_dependency=<DEPFILE>")
@@ -29,6 +28,11 @@ macro(__compiler_ti lang)
2928
set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> qa <TARGET> <OBJECTS>")
3029
set(CMAKE_${lang}_ARCHIVE_FINISH "")
3130

31+
# After the --run_linker flag a response file is not possible
32+
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "")
33+
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES 0)
34+
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 0)
35+
3236
set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_${lang}_COMPILER> <FLAGS> --run_linker --output_file=<TARGET> --map_file=<TARGET_NAME>.map <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>")
3337
endmacro()
3438

0 commit comments

Comments
 (0)