Skip to content

Commit c23ad4e

Browse files
committed
Test-commit
1 parent 249cb84 commit c23ad4e

File tree

21 files changed

+673
-6
lines changed

21 files changed

+673
-6
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use crate::spec::TargetOptions;
2+
3+
pub(crate) fn opts() -> TargetOptions{
4+
TargetOptions{
5+
os: "hobkey".into(),
6+
plt_by_default: false,
7+
max_atomic_width: Some(64),
8+
has_thread_local: false,
9+
..Default::default()
10+
}
11+
}

compiler/rustc_target/src/spec/base/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ pub(crate) mod windows_msvc;
3838
pub(crate) mod windows_uwp_gnu;
3939
pub(crate) mod windows_uwp_msvc;
4040
pub(crate) mod xtensa;
41+
pub(crate) mod hobkey;

compiler/rustc_target/src/spec/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,8 @@ supported_targets! {
20792079
("riscv64gc-unknown-nuttx-elf", riscv64gc_unknown_nuttx_elf),
20802080

20812081
("x86_64-pc-cygwin", x86_64_pc_cygwin),
2082+
2083+
("x86_64-unknown-hobkey", x86_64_unknown_hobkey),
20822084
}
20832085

20842086
/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, Target, TargetMetadata, TargetOptions};
2+
use crate::spec::base;
3+
pub(crate) fn target() -> Target{
4+
let mut base : TargetOptions = base::hobkey::opts();
5+
base.cpu = "x86-64".into();
6+
base.linker_flavor = LinkerFlavor::Gnu(Cc::No, Lld::Yes);
7+
base.linker = Some("rust-lld".into());
8+
base.panic_strategy = PanicStrategy::Abort;
9+
10+
Target{
11+
llvm_target: "x86_64-unknown-none-elf".into(),
12+
metadata: TargetMetadata{
13+
description: None,
14+
tier: None,
15+
host_tools: None,
16+
std: Some(true)
17+
},
18+
pointer_width: 64,
19+
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
20+
arch: "x86_64".into(),
21+
options: base
22+
23+
}
24+
}

err.txt

Lines changed: 319 additions & 0 deletions
Large diffs are not rendered by default.

hobkey-target-spec.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"arch": "x86_64",
3+
"code-model": "kernel",
4+
"cpu": "x86-64",
5+
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
6+
"linker": "rust-lld",
7+
"linker-flavor": "gnu-lld",
8+
"llvm-target": "x86_64-unknown-none-elf",
9+
"max-atomic-width": 64,
10+
"metadata": {
11+
"description": "Rustc for hobkey44",
12+
"host_tools": false,
13+
"std": true,
14+
"tier": 1
15+
},
16+
"plt-by-default": false,
17+
"position-independent-executables": true,
18+
"static-position-independent-executables": true,
19+
"target-pointer-width": "64"
20+
}

library/alloc/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ check-cfg = [
3737
'cfg(no_rc)',
3838
'cfg(no_sync)',
3939
'cfg(randomized_layouts)',
40+
# #[cfg(bootstrap)] hobkey
41+
'cfg(target_os, values("hobkey"))',
4042
]

library/core/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ check-cfg = [
3232
'cfg(bootstrap)',
3333
'cfg(no_fp_fmt_parse)',
3434
'cfg(stdarch_intel_sde)',
35-
# #[cfg(bootstrap)]
35+
# #[cfg(bootstrap)] hobkey
36+
'cfg(target_os, values("hobkey"))',
3637
'cfg(target_feature, values("vector-enhancements-1"))',
3738
# core use #[path] imports to portable-simd `core_simd` crate
3839
# and to stdarch `core_arch` crate which messes-up with Cargo list

library/std/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,6 @@ check-cfg = [
163163
# and to the `backtrace` crate which messes-up with Cargo list
164164
# of declared features, we therefor expect any feature cfg
165165
'cfg(feature, values(any()))',
166+
# #[cfg(bootstrap)] hobkey
167+
'cfg(target_os, values("hobkey"))',
166168
]

library/std/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ fn main() {
6161
|| target_os == "zkvm"
6262
|| target_os == "rtems"
6363
|| target_os == "nuttx"
64+
|| target_os == "hobkey"
6465

6566
// See src/bootstrap/src/core/build_steps/synthetic_targets.rs
6667
|| env::var("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET").is_ok()

0 commit comments

Comments
 (0)