diff options
author | Josef Angstenberger <code@jtxa.de> | 2020-07-11 16:19:34 (GMT) |
---|---|---|
committer | Josef Angstenberger <code@jtxa.de> | 2020-07-14 00:41:50 (GMT) |
commit | 5dec322f3385ae7642f898a1e9d39affb79ca5e6 (patch) | |
tree | e750a393ca0db3ca0641ababfe3819bca2559e1d /Modules/Compiler | |
parent | 763b44e51909674f87bbacc8fb3400254fad074c (diff) | |
download | CMake-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.cmake | 2 |
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=") |