summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-03-24 10:38:54 +0100
committerMartin L Roth <gaumless@tutanota.com>2022-05-28 05:21:14 +0000
commit5b528bc656de4df3ec44df1ddc525ae099b7d219 (patch)
tree5c5a9ef5984ac1a4aa40c71419a275c97fc5260e
parent0c949852485a1add4d8f0ea7f4770693595d80c5 (diff)
Kconfig: Mark clang as ready to use on some arch
This adds 2 flags: * invisible opt-in flag for platforms on which clang seems to work * visible opt-in flag to allow experimenting Clang seems to work rather well on x86_32 so it makes sense to start adding that to Jenkins buildtesting, which this allows. This allows abuild to differentiate between targets that are known to build with clang. This makes buildtesting just those targets easier. Change-Id: I46f1bad59bda94f60f4a141237ede11f6eb93cc2 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63081 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
-rw-r--r--src/Kconfig20
-rw-r--r--src/arch/x86/Kconfig1
2 files changed, 17 insertions, 4 deletions
diff --git a/src/Kconfig b/src/Kconfig
index c58a263b25..f1b4b846b6 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -70,19 +70,31 @@ config COMPILER_GCC
For details see http://gcc.gnu.org.
config COMPILER_LLVM_CLANG
- bool "LLVM/clang (TESTING ONLY - Not currently working)"
+ bool "LLVM/clang"
+ depends on ALLOW_EXPERIMENTAL_CLANG || ARCH_SUPPORTS_CLANG
help
Use LLVM/clang to build coreboot. To use this, you must build the
coreboot version of the clang compiler. Run the command
make clang
- Note that this option is not currently working correctly and should
- really only be selected if you're trying to work on getting clang
- operational.
+ Note that Clang is not currently working on all architectures.
For details see http://clang.llvm.org.
endchoice
+config ARCH_SUPPORTS_CLANG
+ bool
+ help
+ Opt-in flag for architectures that generally work well with CLANG.
+ By default the option would be hidden.
+
+config ALLOW_EXPERIMENTAL_CLANG
+ bool "Allow experimental LLVM/Clang"
+ depends on !ARCH_SUPPORTS_CLANG
+ help
+ On some architectures CLANG does not work that well.
+ Use this only to try to get CLANG working.
+
config ANY_TOOLCHAIN
bool "Allow building with any toolchain"
default n
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 993b1e6608..c00eb0c3b5 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -33,6 +33,7 @@ config ARCH_ALL_STAGES_X86_32
select ARCH_VERSTAGE_X86_32
select ARCH_ROMSTAGE_X86_32
select ARCH_RAMSTAGE_X86_32
+ select ARCH_SUPPORTS_CLANG
# stage selectors for x64