zephyr/cmake/linker/lld/linker_flags.cmake
Alberto Escolar Piedras e9af821e22 cmake: Add partial linking abstraction
Add a property to abstract the partial linking/rellocatable
linking for gcc ld and llvm's lld.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 09:05:14 +02:00

10 lines
375 B
CMake

# Copyright (c) 2022 Google LLC
# SPDX-License-Identifier: Apache-2.0
# Since lld is a drop in replacement for ld, we can just use ld's flags
include(${ZEPHYR_BASE}/cmake/linker/ld/${COMPILER}/linker_flags.cmake OPTIONAL)
set_property(TARGET linker PROPERTY no_position_independent "${LINKERFLAGPREFIX},--no-pie")
set_property(TARGET linker PROPERTY partial_linking "-r")