cmake: Also build C++ files as no-pic
Seems it may have been lost during refactoring that C++ code should also be built as not position independent code to save space. Let's enable it just like for plain C. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
af23628e43
commit
01348d38ca
1 changed files with 1 additions and 0 deletions
|
@ -383,6 +383,7 @@ zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler-cpp,
|
|||
|
||||
# @Intent: Do not make position independent code / executable
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,no_position_independent>>)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler,no_position_independent>>)
|
||||
zephyr_link_libraries($<TARGET_PROPERTY:linker,no_position_independent>)
|
||||
|
||||
# Allow the user to inject options when calling cmake, e.g.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue