mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-09 02:45:21 +00:00
add .S file extension suffix into CMAKE_ASM_SOURCE_FILE_EXTENSIONS, because clang from OneApi can't recongnize them as asm files on windows, then they won't be added into build system. Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
24 lines
1.0 KiB
CMake
24 lines
1.0 KiB
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if(DEFINED TOOLCHAIN_HOME)
|
|
set(find_program_clang_args PATHS ${TOOLCHAIN_HOME} ${ONEAPI_PYTHON_PATH} NO_DEFAULT_PATH)
|
|
set(find_program_binutils_args PATHS ${TOOLCHAIN_HOME} )
|
|
endif()
|
|
|
|
find_program(CMAKE_AR llvm-ar ${find_program_clang_args} )
|
|
find_program(CMAKE_NM llvm-nm ${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})
|
|
find_program(CMAKE_STRIP llvm-strip ${find_program_binutils_args})
|
|
|
|
find_program(CMAKE_GDB gdb-oneapi)
|
|
|
|
# Use the gnu binutil abstraction
|
|
include(${ZEPHYR_BASE}/cmake/bintools/llvm/target_bintools.cmake)
|
|
|