rewrite static-extern-type to rmake
This commit is contained in:
parent
98454ece33
commit
205bfe7213
@ -108,7 +108,6 @@ run-make/simd-ffi/Makefile
|
|||||||
run-make/split-debuginfo/Makefile
|
run-make/split-debuginfo/Makefile
|
||||||
run-make/stable-symbol-names/Makefile
|
run-make/stable-symbol-names/Makefile
|
||||||
run-make/static-dylib-by-default/Makefile
|
run-make/static-dylib-by-default/Makefile
|
||||||
run-make/static-extern-type/Makefile
|
|
||||||
run-make/staticlib-blank-lib/Makefile
|
run-make/staticlib-blank-lib/Makefile
|
||||||
run-make/staticlib-dylib-linkage/Makefile
|
run-make/staticlib-dylib-linkage/Makefile
|
||||||
run-make/symbol-mangling-hashed/Makefile
|
run-make/symbol-mangling-hashed/Makefile
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# ignore-cross-compile
|
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
all: $(call NATIVE_STATICLIB,define-foo)
|
|
||||||
$(RUSTC) -ldefine-foo use-foo.rs
|
|
||||||
$(call RUN,use-foo) || exit 1
|
|
16
tests/run-make/static-extern-type/rmake.rs
Normal file
16
tests/run-make/static-extern-type/rmake.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Static variables coming from a C library through foreign function interface (FFI) are unsized
|
||||||
|
// at compile time - and assuming they are sized used to cause an internal compiler error (ICE).
|
||||||
|
// After this was fixed in #58192, this test checks that external statics can be safely used in
|
||||||
|
// a program that both compiles and executes successfully.
|
||||||
|
// See https://github.com/rust-lang/rust/issues/57876
|
||||||
|
|
||||||
|
//@ ignore-cross-compile
|
||||||
|
// Reason: the compiled binary is executed
|
||||||
|
|
||||||
|
use run_make_support::{build_native_static_lib, run, rustc};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
build_native_static_lib("define-foo");
|
||||||
|
rustc().arg("-ldefine-foo").input("use-foo.rs").run();
|
||||||
|
run("use-foo");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user