Skip to content

Commit 205bfe7

Browse files
committed
rewrite static-extern-type to rmake
1 parent 98454ec commit 205bfe7

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
@@ -108,7 +108,6 @@ run-make/simd-ffi/Makefile
108108
run-make/split-debuginfo/Makefile
109109
run-make/stable-symbol-names/Makefile
110110
run-make/static-dylib-by-default/Makefile
111-
run-make/static-extern-type/Makefile
112111
run-make/staticlib-blank-lib/Makefile
113112
run-make/staticlib-dylib-linkage/Makefile
114113
run-make/symbol-mangling-hashed/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)