From 81f060b8d5f9f53652982f01e2e33bed97276bda Mon Sep 17 00:00:00 2001 From: wangmingrong1 Date: Thu, 14 Nov 2024 17:15:20 +0800 Subject: [PATCH] sim: Add compiler selection Use gcc by default Signed-off-by: wangmingrong1 --- arch/sim/Kconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index bedca62e9f..7a82f9c519 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -15,22 +15,18 @@ config HOST_X86_64 select ARCH_HAVE_STACKCHECK select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF && !SIM_M32 select ARCH_HAVE_MATH_H - select ARCH_TOOLCHAIN_GNU config HOST_X86 bool "x86" select ARCH_HAVE_STACKCHECK - select ARCH_TOOLCHAIN_GNU config HOST_ARM bool "arm" select ARCH_HAVE_STACKCHECK - select ARCH_TOOLCHAIN_GNU config HOST_ARM64 bool "arm64" select ARCH_HAVE_STACKCHECK - select ARCH_TOOLCHAIN_GNU endchoice # Host CPU Type @@ -38,6 +34,20 @@ config ARCH_CHIP string default "sim" +choice + prompt "Toolchain Selection" + default SIM_TOOLCHAIN_GCC + +config SIM_TOOLCHAIN_GCC + bool "Generic GNU toolchain" + select ARCH_TOOLCHAIN_GCC + +config SIM_TOOLCHAIN_CLANG + bool "LLVM Clang toolchain" + select ARCH_TOOLCHAIN_CLANG + +endchoice + config SIM_M32 bool "Build 32-bit simulation on 64-bit machine" default n