Skip to content

Commit

Permalink
clean up rmake test
Browse files Browse the repository at this point in the history
  • Loading branch information
lolbinarycat committed Jul 23, 2024
1 parent 4babd6e commit 9cf175f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ run-make/dump-ice-to-disk/Makefile
run-make/emit-to-stdout/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-fn-explicit-align/Makefile
run-make/extern-fn-generic/Makefile
run-make/extern-fn-mangle/Makefile
Expand Down
40 changes: 20 additions & 20 deletions tests/run-make/extern-flag-disambiguates/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
//@ ignore-cross-compile

use run_make_support::{cwd, run, run_in_tmpdir, rustc};
use run_make_support::{cwd, run, rustc};

// Attempt to build this dependency tree:
//
// A.1 A.2
// |\ |
// | \ |
// B \ C
// \ | /
// \|/
// D
// A.1 A.2
// |\ |
// | \ |
// B \ C
// \ | /
// \|/
// D
//
// Note that A.1 and A.2 are crates with the same name.

// original Makefile at https://github.com/rust-lang/rust/commit/cc3c8bbfaf5af19caf3deb131a995a65ca4674f9#diff-23d3f6bcee0c974ae7c793ab6f87c454cffd1f5c9ec17ce86aaf2cf8bc6e5397

fn main() {
run_in_tmpdir(|| {
rustc().metadata("1").extra_filename("-1").input("a.rs").run();
rustc().metadata("2").extra_filename("-2").input("a.rs").run();
rustc().input("b.rs").extern_("a", "liba-1.rlib").run();
rustc().input("c.rs").extern_("a", "liba-2.rlib").run();
println!("before");
rustc().cfg("before").input("d.rs").extern_("a", "liba-1.rlib").run();
run("d");
println!("after");
rustc().cfg("after").input("d.rs").extern_("a", "liba-1.rlib").run();
run("d");
});
rustc().metadata("1").extra_filename("-1").input("a.rs").run();
rustc().metadata("2").extra_filename("-2").input("a.rs").run();
rustc().input("b.rs").extern_("a", "liba-1.rlib").run();
rustc().input("c.rs").extern_("a", "liba-2.rlib").run();
println!("before");
rustc().cfg("before").input("d.rs").extern_("a", "liba-1.rlib").run();
run("d");
println!("after");
rustc().cfg("after").input("d.rs").extern_("a", "liba-1.rlib").run();
run("d");
}

0 comments on commit 9cf175f

Please sign in to comment.