mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
tools/x86_64: Add LLVM target definitions
Summary: - Added LLVM target definitions (`LLVM_ARCH`, `LLVM_CPU`, `LLVM_ABI`) to `arch/x86_64/src/cmake/Toolchain.cmake` and `arch/x86_64/src/common/Toolchain.defs` - These definitions are necessary for compatibility with LLVM-based toolchains and ensure proper target architecture, CPU, and ABI settings Impact: - Enables support for LLVM-based toolchains when building for x86_64 architecture - No functional changes for existing GNU-based toolchains - Improves maintainability by centralizing LLVM-specific configurations in the toolchain files Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@@ -122,6 +122,11 @@ add_compile_options(
|
||||
-Wno-unknown-pragmas
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>)
|
||||
|
||||
# LLVM target definitions
|
||||
set(LLVM_ARCH "x86_64")
|
||||
set(LLVM_CPU "x86-64")
|
||||
set(LLVM_ABI "sysv")
|
||||
|
||||
if(CONFIG_CXX_STANDARD)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=${CONFIG_CXX_STANDARD}>)
|
||||
endif()
|
||||
|
||||
@@ -70,6 +70,11 @@ ARCHCPUFLAGS = -fno-pic -mcmodel=large -mno-red-zone -mrdrnd
|
||||
ARCHPICFLAGS = -fPIC
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
|
||||
# LLVM target definitions
|
||||
LLVM_ARCHTYPE := x86_64
|
||||
LLVM_CPUTYPE := x86-64
|
||||
LLVM_ABITYPE := sysv
|
||||
|
||||
# We have to use a cross-development toolchain under Cygwin because the native
|
||||
# Cygwin toolchains don't generate ELF binaries.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user