Skip to content

Rollup of 6 pull requests #117714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
be0b42f
Recover from incorrectly ordered/duplicated function keywords
clubby789 Oct 27, 2023
f784fa7
tests/rustdoc-json: Remove some needless uses of `#![no_core]`.
aDotInTheVoid Nov 7, 2023
0875f45
tests/rustdoc-json: Remove more needless uses of `#![no_core]`.
aDotInTheVoid Nov 7, 2023
434b69a
tests/rustdoc-json: Rewrite tests no not use `#![no_core]`.
aDotInTheVoid Nov 7, 2023
94eb6b0
Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`
jmillikin Nov 8, 2023
76aa83e
target: move base specs to spec/base
davidtwco Nov 8, 2023
1af256f
targets: move target specs to spec/targets
davidtwco Nov 8, 2023
ef7ebaa
rustc_target: move file for uniformity
davidtwco Nov 8, 2023
ae4d18b
handle the case when the change-id isn't found
onur-ozkan Oct 27, 2023
e878100
bootstrap: improve `fn check_version`
onur-ozkan Oct 27, 2023
e0cb1cc
bootstrap: add more detail on change-id comments
onur-ozkan Nov 7, 2023
33edea6
Add test for reexported hidden item with `--document-hidden-items`
GuillaumeGomez Nov 8, 2023
fb31b00
Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlin
GuillaumeGomez Nov 8, 2023
fb50ed7
Rollup merge of #117282 - clubby789:recover-wrong-function-header, r=…
GuillaumeGomez Nov 8, 2023
301b4ed
Rollup merge of #117679 - aDotInTheVoid:yes-core, r=GuillaumeGomez
GuillaumeGomez Nov 8, 2023
2627f72
Rollup merge of #117694 - jmillikin:core-io-borrowed-buf, r=m-ou-se
GuillaumeGomez Nov 8, 2023
259b749
Rollup merge of #117702 - davidtwco:target-tier-refactors, r=petroche…
GuillaumeGomez Nov 8, 2023
bf09474
Rollup merge of #117713 - GuillaumeGomez:document-hidden-json, r=notr…
GuillaumeGomez Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
targets: move target specs to spec/targets
Signed-off-by: David Wood <david@davidtw.co>
  • Loading branch information
davidtwco committed Nov 8, 2023
commit 1af256fe8aea69909e1bf068506a29ebbf82eccf
1 change: 0 additions & 1 deletion compiler/rustc_target/src/spec/aarch64_fuchsia.rs

This file was deleted.

2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/base/apple/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{
use crate::spec::targets::{
aarch64_apple_darwin, aarch64_apple_ios_sim, aarch64_apple_watchos_sim, i686_apple_darwin,
x86_64_apple_darwin, x86_64_apple_ios, x86_64_apple_tvos, x86_64_apple_watchos_sim,
};
Expand Down
8 changes: 5 additions & 3 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,14 +1408,16 @@ impl fmt::Display for StackProtector {

macro_rules! supported_targets {
( $(($triple:literal, $module:ident),)+ ) => {
$(mod $module;)+
mod targets {
$(pub(crate) mod $module;)+
}

/// List of supported targets
pub const TARGETS: &[&str] = &[$($triple),+];

fn load_builtin(target: &str) -> Option<Target> {
let mut t = match target {
$( $triple => $module::target(), )+
$( $triple => targets::$module::target(), )+
_ => return None,
};
t.is_builtin = true;
Expand All @@ -1431,7 +1433,7 @@ macro_rules! supported_targets {
$(
#[test] // `#[test]`
fn $module() {
tests_impl::test_target(super::$module::target());
tests_impl::test_target(crate::spec::targets::$module::target());
}
)+
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/targets/aarch64_fuchsia.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use crate::spec::targets::aarch64_unknown_fuchsia::target;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{base, RelocModel, Target, TargetOptions};
use crate::spec::{base, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let base = base::solid::opts("asp3");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, Target, TargetOptions};
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, Target, TargetOptions};

const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding_linker_script.ld");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::spec::SanitizerSet;
use crate::spec::{base, Target, TargetOptions};

use super::SanitizerSet;

pub fn target() -> Target {
let mut base = base::linux_ohos::opts();
base.max_atomic_width = Some(128);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// For example, `-C target-cpu=cortex-a53`.

use super::{
use crate::spec::{
Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, Target, TargetOptions,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// For example, `-C target-cpu=cortex-a53`.

use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let opts = TargetOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{base, RelocModel, Target, TargetOptions};
use crate::spec::{base, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let base = base::solid::opts("asp3");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{base, RelocModel, Target, TargetOptions};
use crate::spec::{base, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let base = base::solid::opts("asp3");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// - `relocation-model` set to `static`; also no PIE, no relro and no dynamic
// linking. rationale: matches `thumb` targets

use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let opts = TargetOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// changes (list in `armv7a_none_eabi.rs`) to bring it closer to the bare-metal
// `thumb` & `aarch64` targets.

use super::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let opts = TargetOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{wasm32_unknown_emscripten, LinkerFlavor, Target};
use crate::spec::{targets::wasm32_unknown_emscripten, LinkerFlavor, Target};

pub fn target() -> Target {
let mut target = wasm32_unknown_emscripten::target();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel};
use super::{Target, TargetOptions};
use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel};
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel};
use super::{Target, TargetOptions};
use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel};
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::spec::SanitizerSet;
use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy};
use crate::spec::{RelocModel, Target, TargetOptions};

use super::SanitizerSet;

pub fn target() -> Target {
Target {
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::borrow::Cow;

use super::{cvs, Cc, LinkerFlavor, Lld, Target, TargetOptions};
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, Target, TargetOptions};

pub fn target() -> Target {
let pre_link_args = TargetOptions::link_args(
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/targets/x86_64_fuchsia.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use crate::spec::targets::x86_64_unknown_fuchsia::target;
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// `target-cpu` compiler flags to opt-in more hardware-specific
// features.

use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy};
use super::{RelroLevel, SanitizerSet, StackProbeType, Target, TargetOptions};
use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy};
use crate::spec::{RelroLevel, SanitizerSet, StackProbeType, Target, TargetOptions};

pub fn target() -> Target {
let opts = TargetOptions {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_target/src/spec/x86_64_fuchsia.rs

This file was deleted.