1# Copyright (c) 2024 Nordic Semiconductor
2#
3# SPDX-License-Identifier: Apache-2.0
4
5# When doing native builds, then we default to host libraries.
6# No reason for loading linker libraries properties in this case, however we do
7# define link order because that allows the build system to hook in alternative
8# C library implementations, such as minimal libc or picolibc.
9
10# Empty on purpose as we default to host libraries selected by the linker.
11set_linker_property(PROPERTY c_library "")
12set_linker_property(PROPERTY rt_library "")
13set_linker_property(PROPERTY c++_library "")
14
15# Although library properties are empty per default, then we still define link
16# order as this allows to update libraries in use elsewhere.
17if(CONFIG_CPP)
18  set_property(TARGET linker PROPERTY link_order_library "c++")
19endif()
20
21set_property(TARGET linker APPEND PROPERTY link_order_library "c;rt")
22