From 6bf37559da857b1a8189b1a362157b8f00f3a356 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Tue, 9 Apr 2024 19:42:02 +0200 Subject: [PATCH] support compiling with clang Signed-off-by: Axel Heider --- settings.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/settings.cmake b/settings.cmake index 54af1d77..825c2fd9 100644 --- a/settings.cmake +++ b/settings.cmake @@ -64,7 +64,14 @@ if(NOT Sel4benchAllowSettingsOverride) # This option is controlled by ApplyCommonReleaseVerificationSettings mark_as_advanced(CMAKE_BUILD_TYPE) if(RELEASE) - if(NOT KernelArchRiscV) + # Know issues with KernelFWholeProgram ('-fwhole-program'): + # - the RISC-V kernel build with gcc currently fails due to a issing + # compiler runtime helper function. + # - this option is not supposed by 'clang' at all. Note that we can't + # check CMAKE_C_COMPILER_ID here, because it is empty, as this file + # might get processed before CMake does any compiler evaluation. Thus, + # the only option is checking if TRIPLE is set or not. + if((NOT KernelArchRiscV) AND (TRIPLE STREQUAL "")) set(KernelFWholeProgram ON CACHE BOOL "" FORCE) endif() endif()