about summary refs log tree commit diff
path: root/compiler/rustc_target/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-23 07:32:55 +0000
committerbors <bors@rust-lang.org>2023-10-23 07:32:55 +0000
commit6bb4ad6dfb7d373c2f19b6cc8c0f05bd73f6d3cc (patch)
tree2b23e24a12730e1439ec7bc10ba9101eb969e7a1 /compiler/rustc_target/src
parentaec4741d42e10673e7d5fe0f1c96d407801884e8 (diff)
parentcec7d4a0755f5e776a91d1e15850a3d17ee742cc (diff)
downloadrust-6bb4ad6dfb7d373c2f19b6cc8c0f05bd73f6d3cc.tar.gz
rust-6bb4ad6dfb7d373c2f19b6cc8c0f05bd73f6d3cc.zip
Auto merge of #117071 - matthiaskrgr:rollup-1tcxdgj, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #105666 (rustdoc: align stability badge to baseline instead of bottom)
 - #117042 (coverage: Emit the filenames section before encoding per-function mappings)
 - #117044 (Miri subtree update)
 - #117049 (add a `csky-unknown-linux-gnuabiv2hf` target )
 - #117051 (fix broken link: update incremental compilation url)
 - #117069 (x.ps1: remove the check for Python from Windows Store)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_target/src')
-rw-r--r--compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs2
-rw-r--r--compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs21
-rw-r--r--compiler/rustc_target/src/spec/mod.rs1
3 files changed, 23 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs b/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs
index 7d03dd26f5d..93becd70869 100644
--- a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs
+++ b/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2.rs
@@ -12,7 +12,7 @@ pub fn target() -> Target {
         options: TargetOptions {
             abi: "abiv2".into(),
             features: "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(),
-            late_link_args_static: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a"]),
+            late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a"]),
             max_atomic_width: Some(32),
             ..super::linux_gnu_base::opts()
         },
diff --git a/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs b/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs
new file mode 100644
index 00000000000..74518834160
--- /dev/null
+++ b/compiler/rustc_target/src/spec/csky_unknown_linux_gnuabiv2hf.rs
@@ -0,0 +1,21 @@
+use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions};
+
+// This target is for glibc Linux on Csky
+
+pub fn target() -> Target {
+    Target {
+        //https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h
+        llvm_target: "csky-unknown-linux-gnuabiv2".into(),
+        pointer_width: 32,
+        data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(),
+        arch: "csky".into(),
+        options: TargetOptions {
+            abi: "abiv2hf".into(),
+            cpu: "ck860fv".into(),
+            features: "+hard-float,+hard-float-abi,+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(),
+            late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a", "-mhard-float"]),
+            max_atomic_width: Some(32),
+            ..super::linux_gnu_base::opts()
+        },
+    }
+}
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 16f70cf43b3..f1c7513d885 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1344,6 +1344,7 @@ supported_targets! {
     ("loongarch64-unknown-linux-gnu", loongarch64_unknown_linux_gnu),
     ("m68k-unknown-linux-gnu", m68k_unknown_linux_gnu),
     ("csky-unknown-linux-gnuabiv2", csky_unknown_linux_gnuabiv2),
+    ("csky-unknown-linux-gnuabiv2hf", csky_unknown_linux_gnuabiv2hf),
     ("mips-unknown-linux-gnu", mips_unknown_linux_gnu),
     ("mips64-unknown-linux-gnuabi64", mips64_unknown_linux_gnuabi64),
     ("mips64el-unknown-linux-gnuabi64", mips64el_unknown_linux_gnuabi64),