summaryrefslogtreecommitdiffstats
path: root/src/test/run-make/raw-dylib-link-ordinal
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/run-make/raw-dylib-link-ordinal
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/run-make/raw-dylib-link-ordinal')
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/Makefile22
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/driver.rs5
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/exporter.c12
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/exporter.def5
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/lib.rs21
-rw-r--r--src/test/run-make/raw-dylib-link-ordinal/output.txt3
6 files changed, 0 insertions, 68 deletions
diff --git a/src/test/run-make/raw-dylib-link-ordinal/Makefile b/src/test/run-make/raw-dylib-link-ordinal/Makefile
deleted file mode 100644
index b55a94dbc..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# Test the behavior of #[link(.., kind = "raw-dylib")] and #[link_ordinal] on windows-msvc
-
-# only-windows
-
-include ../../run-make-fulldeps/tools.mk
-
-all:
- $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
- $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
- $(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
-ifdef IS_MSVC
- $(CC) "$(TMPDIR)"/exporter.obj exporter.def -link -dll -out:"$(TMPDIR)"/exporter.dll -noimplib
-else
- $(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
-endif
- "$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
-
-ifdef RUSTC_BLESS_TEST
- cp "$(TMPDIR)"/output.txt output.txt
-else
- $(DIFF) output.txt "$(TMPDIR)"/output.txt
-endif
diff --git a/src/test/run-make/raw-dylib-link-ordinal/driver.rs b/src/test/run-make/raw-dylib-link-ordinal/driver.rs
deleted file mode 100644
index 4059ede11..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/driver.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-extern crate raw_dylib_test;
-
-fn main() {
- raw_dylib_test::library_function();
-}
diff --git a/src/test/run-make/raw-dylib-link-ordinal/exporter.c b/src/test/run-make/raw-dylib-link-ordinal/exporter.c
deleted file mode 100644
index aabf32ff1..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/exporter.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <stdio.h>
-
-void exported_function() {
- printf("exported_function\n");
-}
-
-int exported_variable = 0;
-
-void print_exported_variable() {
- printf("exported_variable value: %d\n", exported_variable);
- fflush(stdout);
-}
diff --git a/src/test/run-make/raw-dylib-link-ordinal/exporter.def b/src/test/run-make/raw-dylib-link-ordinal/exporter.def
deleted file mode 100644
index 5d87c580a..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/exporter.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY exporter
-EXPORTS
- exported_function @13 NONAME
- exported_variable @5 NONAME
- print_exported_variable @9 NONAME
diff --git a/src/test/run-make/raw-dylib-link-ordinal/lib.rs b/src/test/run-make/raw-dylib-link-ordinal/lib.rs
deleted file mode 100644
index bb25ac64c..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
-#[link(name = "exporter", kind = "raw-dylib")]
-extern {
- #[link_ordinal(13)]
- fn imported_function();
- #[link_ordinal(5)]
- static mut imported_variable: i32;
- #[link_ordinal(9)]
- fn print_imported_variable();
-}
-
-pub fn library_function() {
- unsafe {
- imported_function();
- imported_variable = 42;
- print_imported_variable();
- imported_variable = -42;
- print_imported_variable();
- }
-}
diff --git a/src/test/run-make/raw-dylib-link-ordinal/output.txt b/src/test/run-make/raw-dylib-link-ordinal/output.txt
deleted file mode 100644
index a4b2031d9..000000000
--- a/src/test/run-make/raw-dylib-link-ordinal/output.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-exported_function
-exported_variable value: 42
-exported_variable value: -42