rewrite linkage-attr-on-static to rmake

This commit is contained in:
Oneirical 2024-07-12 15:58:06 -04:00
parent db8398db6f
commit 1f976b43da
4 changed files with 15 additions and 14 deletions

View File

@ -48,7 +48,6 @@ run-make/libtest-junit/Makefile
run-make/libtest-thread-limit/Makefile run-make/libtest-thread-limit/Makefile
run-make/link-cfg/Makefile run-make/link-cfg/Makefile
run-make/link-framework/Makefile run-make/link-framework/Makefile
run-make/linkage-attr-on-static/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile run-make/long-linker-command-lines/Makefile
run-make/lto-linkage-used-attr/Makefile run-make/lto-linkage-used-attr/Makefile
@ -76,7 +75,6 @@ run-make/redundant-libs/Makefile
run-make/remap-path-prefix-dwarf/Makefile run-make/remap-path-prefix-dwarf/Makefile
run-make/reproducible-build-2/Makefile run-make/reproducible-build-2/Makefile
run-make/reproducible-build/Makefile run-make/reproducible-build/Makefile
run-make/return-non-c-like-enum-from-c/Makefile
run-make/rlib-format-packed-bundled-libs-2/Makefile run-make/rlib-format-packed-bundled-libs-2/Makefile
run-make/rlib-format-packed-bundled-libs-3/Makefile run-make/rlib-format-packed-bundled-libs-3/Makefile
run-make/rlib-format-packed-bundled-libs/Makefile run-make/rlib-format-packed-bundled-libs/Makefile

View File

@ -1,6 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all: $(call NATIVE_STATICLIB,foo)
$(RUSTC) bar.rs
$(call RUN,bar) || exit 1

View File

@ -0,0 +1,15 @@
// #[linkage] is a useful attribute which can be applied to statics to allow
// external linkage, something which was not possible before #18890. This test
// checks that using this new feature results in successful compilation and execution.
// See https://github.com/rust-lang/rust/pull/18890
//@ 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("foo");
rustc().input("bar.rs").run();
run("bar");
}

View File

@ -1,6 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all: $(call NATIVE_STATICLIB,test)
$(RUSTC) nonclike.rs -L$(TMPDIR) -ltest
$(call RUN,nonclike)