diff --git a/arch/x86/core/ia32.cmake b/arch/x86/core/ia32.cmake index f9a2a7018e3..48207011b50 100644 --- a/arch/x86/core/ia32.cmake +++ b/arch/x86/core/ia32.cmake @@ -1,7 +1,8 @@ # Copyright (c) 2019 Intel Corp. # SPDX-License-Identifier: Apache-2.0 -if (CMAKE_C_COMPILER_ID STREQUAL "Clang") +if (CMAKE_C_COMPILER_ID STREQUAL "Clang" + OR CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") # We rely on GAS for assembling, so don't use the integrated assembler zephyr_compile_options($<$:-no-integrated-as>) elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") diff --git a/arch/x86/ia32.cmake b/arch/x86/ia32.cmake index 6f718215456..ee2c7a7f01e 100644 --- a/arch/x86/ia32.cmake +++ b/arch/x86/ia32.cmake @@ -12,7 +12,8 @@ endif() set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "i386") set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT "elf32-i386") -if(CMAKE_C_COMPILER_ID STREQUAL "Clang") +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" + OR CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") zephyr_compile_options(-Qunused-arguments) zephyr_cc_option( diff --git a/cmake/app/boilerplate.cmake b/cmake/app/boilerplate.cmake index 1bd4f699ef3..4ae701b15b9 100644 --- a/cmake/app/boilerplate.cmake +++ b/cmake/app/boilerplate.cmake @@ -609,6 +609,11 @@ endif() include(${ZEPHYR_BASE}/cmake/target_toolchain.cmake) project(Zephyr-Kernel VERSION ${PROJECT_VERSION}) + +# Add .S file extension suffix into CMAKE_ASM_SOURCE_FILE_EXTENSIONS, +# because clang from OneApi can't recongnize them as asm files on +# windows now. +list(APPEND CMAKE_ASM_SOURCE_FILE_EXTENSIONS "S") enable_language(C CXX ASM) # The setup / configuration of the toolchain itself and the configuration of # supported compilation flags are now split, as this allows to use the toolchain diff --git a/cmake/bintools/oneApi/target.cmake b/cmake/bintools/oneApi/target.cmake index 3abe5e813e0..4b69900f068 100644 --- a/cmake/bintools/oneApi/target.cmake +++ b/cmake/bintools/oneApi/target.cmake @@ -7,7 +7,10 @@ endif() find_program(CMAKE_AR llvm-ar ${find_program_clang_args} ) find_program(CMAKE_NM llvm-nm ${find_program_clang_args} ) -find_program(CMAKE_OBJDUMP llvm-objdump ${find_program_clang_args} ) +# In OneApi installation directory on Windows, there is no llvm-objdump +# binary, so would better use objdump from system environment both +# on Linux and Windows. +find_program(CMAKE_OBJDUMP objdump ${find_program_binutils_args}) find_program(CMAKE_RANLIB llvm-ranlib ${find_program_clang_args} ) find_program(CMAKE_OBJCOPY llvm-objcopy ${find_program_binutils_args}) find_program(CMAKE_READELF readelf ${find_program_binutils_args})