Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rewrite extern-overrides-distribution to rmake
  • Loading branch information
Oneirical committed Jun 18, 2024
commit d1e8c6bc7e93b6649e9dab0604dcc591dde03af0
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 @@ -49,7 +49,6 @@ run-make/extern-fn-with-packed-struct/Makefile
run-make/extern-fn-with-union/Makefile
run-make/extern-multiple-copies/Makefile
run-make/extern-multiple-copies2/Makefile
run-make/extern-overrides-distribution/Makefile
run-make/extra-filename-with-temp-outputs/Makefile
run-make/fmt-write-bloat/Makefile
run-make/forced-unwind-terminate-pof/Makefile
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/extern-overrides-distribution/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions tests/run-make/extern-overrides-distribution/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// The --extern flag should override any "crate_type" declarations in the
// Rust files themselves. In this test, libc is compiled as "lib", but
// main.rs will only run with an rlib, which checks if the --extern flag
// is successfully overriding the default behaviour.
// See https://github.com/rust-lang/rust/pull/21782

//@ ignore-cross-compile

use run_make_support::{rust_lib_name, rustc};

fn main() {
rustc().input("libc.rs").metadata("foo").run();
rustc().input("main.rs").extern_("libc", rust_lib_name("libc")).run();
}