History

LoongArch: rust: Switch to use built-in rustc target

This commit switches to use the LoongArch's built-in rustc target 'loongarch64-unknown-none-softfloat'. The Rust samples have been tested.

WANG Rui committed 2 years ago

Commit 8f8d74e1 parent d6af2c74 files · +4 −9Browse files

Showing the changes to scripts (2 of 4 files). Show all

Unified · Split

2 files
  1. scripts/Makefile +1 −1
  2. scripts/generate_rust_target.rs +1 −6
scripts/Makefile+1−1
@@ -12,7 +12,7 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert · 11 unmodified lines
12hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder12hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder
13hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen13hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen
14 14
15ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),)15ifdef CONFIG_X86_64
16always-$(CONFIG_RUST) += target.json16always-$(CONFIG_RUST) += target.json
17filechk_rust_target = $< < include/config/auto.conf17filechk_rust_target = $< < include/config/auto.conf
18 18
scripts/generate_rust_target.rs+1−6
@@ -164,12 +164,7 @@ fn main() { · 163 unmodified lines
164 ts.push("llvm-target", "x86_64-linux-gnu");164 ts.push("llvm-target", "x86_64-linux-gnu");
165 ts.push("target-pointer-width", "64");165 ts.push("target-pointer-width", "64");
166 } else if cfg.has("LOONGARCH") {166 } else if cfg.has("LOONGARCH") {
167 ts.push("arch", "loongarch64");167 panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target");
168 ts.push("data-layout", "e-m:e-p:64:64-i64:64-i128:128-n64-S128");
169 ts.push("features", "-f,-d");
170 ts.push("llvm-target", "loongarch64-linux-gnusf");
171 ts.push("llvm-abiname", "lp64s");
172 ts.push("target-pointer-width", "64");
173 } else {168 } else {
174 panic!("Unsupported architecture");169 panic!("Unsupported architecture");
175 }170 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t