Skip to content

Commit fdcb614

Browse files
committed
rewrite static-extern-type to rmake
1 parent c185b8f commit fdcb614

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ run-make/simd-ffi/Makefile
121121
run-make/split-debuginfo/Makefile
122122
run-make/stable-symbol-names/Makefile
123123
run-make/static-dylib-by-default/Makefile
124-
run-make/static-extern-type/Makefile
125124
run-make/staticlib-blank-lib/Makefile
126125
run-make/staticlib-dylib-linkage/Makefile
127126
run-make/std-core-cycle/Makefile

tests/run-make/static-extern-type/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Static variables coming from a C library through foreign function interface (FFI) are unsized
2+
// at compile time - and assuming they are sized used to cause an internal compiler error (ICE).
3+
// After this was fixed in #58192, this test checks that external statics can be safely used in
4+
// a program that both compiles and executes successfully.
5+
// See https://github.com/rust-lang/rust/issues/57876
6+
7+
//@ ignore-cross-compile
8+
// Reason: the compiled binary is executed
9+
10+
use run_make_support::{build_native_static_lib, run, rustc};
11+
12+
fn main() {
13+
build_native_static_lib("define-foo");
14+
rustc().arg("-ldefine-foo").input("use-foo.rs").run();
15+
run("use-foo");
16+
}

0 commit comments

Comments
 (0)