summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorJosef Angstenberger <code@jtxa.de>2020-07-11 16:19:34 (GMT)
committerJosef Angstenberger <code@jtxa.de>2020-07-14 00:41:50 (GMT)
commit5dec322f3385ae7642f898a1e9d39affb79ca5e6 (patch)
treee750a393ca0db3ca0641ababfe3819bca2559e1d /Modules/Compiler
parent763b44e51909674f87bbacc8fb3400254fad074c (diff)
downloadCMake-5dec322f3385ae7642f898a1e9d39affb79ca5e6.zip
CMake-5dec322f3385ae7642f898a1e9d39affb79ca5e6.tar.gz
CMake-5dec322f3385ae7642f898a1e9d39affb79ca5e6.tar.bz2
Compiler/TI: Add compiler flags to linker
By adding the compiler flags via `<FLAGS>` to the linker call, the linker can decide which default library to use. CMake replaces `<FLAGS>` by the content of `CMAKE_<LANG>_FLAGS`. So any relevant flag needs to be defined in this variable, preferably in a toolchain file. The compiler flags have to be specified before the `--run_linker` flag and the linker flags afterwards. Replaces Merge-request !4890
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/TI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/TI.cmake b/Modules/Compiler/TI.cmake
index 59dd585..c985b96 100644
--- a/Modules/Compiler/TI.cmake
+++ b/Modules/Compiler/TI.cmake
@@ -29,7 +29,7 @@ macro(__compiler_ti lang)
set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> qa <TARGET> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_FINISH "")
- set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_${lang}_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET_NAME>.map <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>")
+ 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>")
endmacro()
set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")