cmake/compiler: Add linker_script compiler property
This property specifies the flag used to pass the linker script filename through the compiler front end tot he linker. For clang, we use the general purpose linker-pass through -Wl flag with -T: -Wl,-T as clang doesn't support -T. For gcc, we use -T directly as this keeps the picolibc specs file from inserting the picolibc linker script as well. If the compiler doesn't specify a value, we continue to use -Wl,-T as before. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
235caf2234
commit
424590f7d8
4 changed files with 12 additions and 2 deletions
|
@ -182,6 +182,9 @@ set_compiler_property(PROPERTY debug -g)
|
|||
# Flags to save temporary object files
|
||||
set_compiler_property(PROPERTY save_temps -save-temps=obj)
|
||||
|
||||
# Flag to specify linker script
|
||||
set_compiler_property(PROPERTY linker_script -T)
|
||||
|
||||
# Flags to not track macro expansion
|
||||
set_compiler_property(PROPERTY no_track_macro_expansion -ftrack-macro-expansion=0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue