Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 48 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,54 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
}
}

/// Runs `library/stdarch/crates/stdarch-verify`'s tests which cross-check the
/// `core::arch` intrinsics for x86, Arm, and MIPS against the corresponding
/// vendor references (signatures, target features, and `assert_instr` mappings).
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct StdarchVerify;

impl Step for StdarchVerify {
type Output = ();
const IS_HOST: bool = true;
Comment thread
Kobzol marked this conversation as resolved.

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("library/stdarch/crates/stdarch-verify")
}

fn is_default_step(_builder: &Builder<'_>) -> bool {
true
}
Comment thread
Kobzol marked this conversation as resolved.

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(StdarchVerify);
}

fn run(self, builder: &Builder<'_>) {
let host = builder.config.host_target;
let build_compiler = builder.compiler(0, host);

let cargo = tool::prepare_tool_cargo(
builder,
build_compiler,
Mode::ToolBootstrap,
host,
Kind::Test,
"library/stdarch/crates/stdarch-verify",
SourceType::InTree,
&[],
);

run_cargo_test(
cargo,
&[],
&["stdarch-verify".to_string()],
Some("stdarch-verify"),
host,
builder,
);
}
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Clippy {
compilers: RustcPrivateCompilers,
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub fn default_paths_to_vendor(builder: &Builder<'_>) -> Vec<(PathBuf, Vec<&'sta
("compiler/rustc_codegen_cranelift/Cargo.toml", vec![]),
("compiler/rustc_codegen_gcc/Cargo.toml", vec![]),
("library/Cargo.toml", vec![]),
("library/stdarch/Cargo.toml", vec![]),
Comment thread
Kobzol marked this conversation as resolved.
("src/bootstrap/Cargo.toml", vec![]),
("src/tools/rustbook/Cargo.toml", SUBMODULES_FOR_RUSTBOOK.into()),
("src/tools/rustc-perf/Cargo.toml", vec!["src/tools/rustc-perf"]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ expression: test
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::StdarchVerify
targets: [x86_64-unknown-linux-gnu]
- Set({test::library/stdarch/crates/stdarch-verify})
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ expression: test library
- Set({test::library/sysroot})
- Set({test::library/test})
- Set({test::library/unwind})
[Test] test::StdarchVerify
targets: [x86_64-unknown-linux-gnu]
- Set({test::library/stdarch/crates/stdarch-verify})
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ expression: test --skip=coverage
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::StdarchVerify
targets: [x86_64-unknown-linux-gnu]
- Set({test::library/stdarch/crates/stdarch-verify})
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ expression: test --skip=tests
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::StdarchVerify
targets: [x86_64-unknown-linux-gnu]
- Set({test::library/stdarch/crates/stdarch-verify})
[Test] test::RustdocTheme
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc-themes})
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ impl<'a> Builder<'a> {
test::CargoMiri,
test::Clippy,
test::CompiletestTest,
test::StdarchVerify,
test::CrateRunMakeSupport,
test::CrateBuildHelper,
test::RustdocJSStd,
Expand Down
8 changes: 8 additions & 0 deletions src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ pub(crate) const WORKSPACES: &[WorkspaceInfo<'static>] = &[
)),
submodules: &[],
},
WorkspaceInfo {
path: "library/stdarch",
exceptions: EXCEPTIONS_STDARCH,
crates_and_deps: None,
submodules: &[],
},
WorkspaceInfo {
path: "compiler/rustc_codegen_cranelift",
exceptions: EXCEPTIONS_CRANELIFT,
Expand Down Expand Up @@ -254,6 +260,8 @@ const EXCEPTIONS_RUSTBOOK: ExceptionList = &[
// tidy-alphabetical-end
];

const EXCEPTIONS_STDARCH: ExceptionList = &[];

const EXCEPTIONS_CRANELIFT: ExceptionList = &[];

const EXCEPTIONS_GCC: ExceptionList = &[
Expand Down
Loading