Skip to content

Commit abcbb1e

Browse files
no1wudixiaoxiang781216
authored andcommitted
tools/Rust.defs: Use 'gnu' target for Linux and 'darwin' for macOS
Summary: - Updated `Rust.defs` to use `gnu` as the target for Linux systems and `darwin` for macOS systems - This change aligns with Rust toolchain conventions, where `gnu` is used to declare the system environment rather than the actual ABI name (e.g., `sysv`) Impact: - No functional changes - the Rust toolchain interprets `gnu` correctly for Linux targets - Improves consistency with Rust toolchain conventions and reduces potential confusion - Maintains compatibility with existing Rust builds on Linux and macOS systems Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
1 parent a2e8bb8 commit abcbb1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/Rust.defs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ ifeq ($(CONFIG_ARCH_SIM),y)
3838
ifeq ($(CONFIG_HOST_LINUX),y)
3939
ifeq ($(LLVM_ARCHTYPE),x86)
4040
# Only for x86 based host or x64 but m32 build
41-
RUSTFLAGS += --target i686-unknown-linux-$(LLVM_ABITYPE)
41+
RUSTFLAGS += --target i686-unknown-linux-gnu
4242
else
4343
# For other archs, such as aarch64, arm etc
44-
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-$(LLVM_ABITYPE)
44+
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-gnu
4545
endif
4646
else ifeq ($(CONFIG_HOST_MACOS),y)
47-
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-$(LLVM_ABITYPE)
47+
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-darwin
4848
endif
4949
else ifeq ($(CONFIG_ARCH_RISCV),y)
5050
# Target triple is riscv[32|64][isa]-unknown-none-elf

0 commit comments

Comments
 (0)