toolchain: move CONFIG_LLVM_USE_LD into cmake/toolchain/llvm
This moves CONFIG_LLVM_USE_LD into cmake/toolchain/llvm as this is a toolchain kconfig. Also make it a choice to allow the use of LLVM's lld as linker. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
7864caba1b
commit
4d914f4f89
|
@ -167,13 +167,6 @@ config CMAKE_LINKER_GENERATOR
|
|||
|
||||
endchoice
|
||||
|
||||
config LLVM_USE_LD
|
||||
bool "LLVM use ld linker"
|
||||
depends on "${ZEPHYR_TOOLCHAIN_VARIANT}" = "llvm"
|
||||
default y
|
||||
help
|
||||
Use binutils ld linker instead of LLVM built-in lld linker.
|
||||
|
||||
config HAVE_CUSTOM_LINKER_SCRIPT
|
||||
bool "Custom linker script provided"
|
||||
help
|
||||
|
|
19
cmake/toolchain/llvm/Kconfig
Normal file
19
cmake/toolchain/llvm/Kconfig
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Copyright (c) 2023 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice LLVM_LINKER
|
||||
prompt "LLVM Linker"
|
||||
depends on "${ZEPHYR_TOOLCHAIN_VARIANT}" = "llvm"
|
||||
default LLVM_USE_LD
|
||||
|
||||
config LLVM_USE_LD
|
||||
bool "GNU ld"
|
||||
help
|
||||
Use binutils ld linker with llvm/clang.
|
||||
|
||||
config LLVM_USE_LLD
|
||||
bool "LLVM lld"
|
||||
help
|
||||
Use LLVM built-in lld linker with llvm/clang.
|
||||
|
||||
endchoice
|
|
@ -623,6 +623,10 @@ flagged.
|
|||
"FOO_SETTING_1",
|
||||
"FOO_SETTING_2",
|
||||
"LSM6DSO_INT_PIN",
|
||||
"LLVM_USE_LD", # Both LLVM_USE_* are in cmake/toolchain/llvm/Kconfig
|
||||
"LLVM_USE_LLD", # which are only included if LLVM is selected but
|
||||
# not other toolchains. Compliance check would complain,
|
||||
# for example, if you are using GCC.
|
||||
"MCUBOOT_LOG_LEVEL_WRN", # Used in example adjusting MCUboot
|
||||
# config,
|
||||
"MCUBOOT_DOWNGRADE_PREVENTION", # but symbols are defined in MCUboot
|
||||
|
|
Loading…
Reference in a new issue