Skip to content

Commit

Permalink
Commit : Move alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-51 committed Mar 11, 2024
1 parent 6639672 commit 1e6d860
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 12 deletions.
6 changes: 6 additions & 0 deletions src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ impl RustcInvocationBuilder {
self
}

pub fn arg_path(&mut self, path: &[&str]) -> &mut RustcInvocationBuilder {
let path_buf = path.iter().collect::<PathBuf>();
self.cmd.arg(path_buf.to_str().unwrap());
self
}

#[track_caller]
pub fn run(&mut self) -> Output {
let caller_location = std::panic::Location::caller();
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/alloc-no-oom-handling/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tests/run-make/alloc-no-oom-handling/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ignore-tidy-linelength

extern crate run_make_support;

use run_make_support::rustc;
use std::path::PathBuf;

fn main() {
rustc()
.arg("--edition")
.arg("2021")
.arg("-Dwarnings")
.arg("--crate-type")
.arg("rlib")
.arg_path(&["..", "..", "..", "library", "alloc", "src", "lib.rs"])
.arg("--cfg")
.arg("no_global_oom_handling")
.run();
}
4 changes: 0 additions & 4 deletions tests/run-make/alloc-no-rc/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tests/run-make/alloc-no-rc/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ignore-tidy-linelength

extern crate run_make_support;

use run_make_support::rustc;
use std::path::PathBuf;

fn main() {
rustc()
.arg("--edition")
.arg("2021")
.arg("-Dwarnings")
.arg("--crate-type")
.arg("rlib")
.arg_path(&["..", "..", "..", "library", "alloc", "src", "lib.rs"])
.arg("--cfg")
.arg("no_rc")
.run();
}
4 changes: 0 additions & 4 deletions tests/run-make/alloc-no-sync/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tests/run-make/alloc-no-sync/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ignore-tidy-linelength

extern crate run_make_support;

use run_make_support::rustc;
use std::path::PathBuf;

fn main() {
rustc()
.arg("--edition")
.arg("2021")
.arg("-Dwarnings")
.arg("--crate-type")
.arg("rlib")
.arg_path(&["..", "..", "..", "library", "alloc", "src", "lib.rs"])
.arg("--cfg")
.arg("no_sync")
.run();
}

0 comments on commit 1e6d860

Please sign in to comment.