diff options
author | WANG Rui <wangrui@loongson.cn> | 2024-01-17 12:43:00 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2024-01-17 12:43:00 +0800 |
commit | 90868ff9cadecd46fa2a4f5501c66bfea8ade9b7 (patch) | |
tree | 7557db8f2a52fbdbe29073b101340e23a44c7025 /scripts/generate_rust_target.rs | |
parent | f58b0abae839f06be9d791d16196922a4b281777 (diff) | |
download | lwn-90868ff9cadecd46fa2a4f5501c66bfea8ade9b7.tar.gz lwn-90868ff9cadecd46fa2a4f5501c66bfea8ade9b7.zip |
LoongArch: Enable initial Rust support
Enable initial Rust support for LoongArch.
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts/generate_rust_target.rs')
-rw-r--r-- | scripts/generate_rust_target.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs index 3c6cbe2b278d..0da52b548ba5 100644 --- a/scripts/generate_rust_target.rs +++ b/scripts/generate_rust_target.rs @@ -161,6 +161,13 @@ fn main() { ts.push("features", features); ts.push("llvm-target", "x86_64-linux-gnu"); ts.push("target-pointer-width", "64"); + } else if cfg.has("LOONGARCH") { + ts.push("arch", "loongarch64"); + ts.push("data-layout", "e-m:e-p:64:64-i64:64-i128:128-n64-S128"); + ts.push("features", "-f,-d"); + ts.push("llvm-target", "loongarch64-linux-gnusf"); + ts.push("llvm-abiname", "lp64s"); + ts.push("target-pointer-width", "64"); } else { panic!("Unsupported architecture"); } |