summaryrefslogtreecommitdiffstats
path: root/src/test/run-make/native-link-modifier-bundle
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/native-link-modifier-bundle
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/native-link-modifier-bundle')
-rw-r--r--src/test/run-make/native-link-modifier-bundle/Makefile33
-rw-r--r--src/test/run-make/native-link-modifier-bundle/bundled.rs11
-rw-r--r--src/test/run-make/native-link-modifier-bundle/cdylib-bundled.rs1
-rw-r--r--src/test/run-make/native-link-modifier-bundle/cdylib-non-bundled.rs1
-rw-r--r--src/test/run-make/native-link-modifier-bundle/native-staticlib.c1
-rw-r--r--src/test/run-make/native-link-modifier-bundle/non-bundled.rs11
6 files changed, 0 insertions, 58 deletions
diff --git a/src/test/run-make/native-link-modifier-bundle/Makefile b/src/test/run-make/native-link-modifier-bundle/Makefile
deleted file mode 100644
index 7c78d7783..000000000
--- a/src/test/run-make/native-link-modifier-bundle/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# ignore-cross-compile
-# ignore-windows-msvc
-
-include ../../run-make-fulldeps/tools.mk
-
-# We're using the llvm-nm instead of the system nm to ensure it is compatible
-# with the LLVM bitcode generated by rustc.
-NM = "$(LLVM_BIN_DIR)"/llvm-nm
-
-all: $(call NATIVE_STATICLIB,native-staticlib)
- # Build a staticlib and a rlib, the `native_func` symbol will be bundled into them
- $(RUSTC) bundled.rs --crate-type=staticlib --crate-type=rlib
- $(NM) $(TMPDIR)/libbundled.a | $(CGREP) -e "T _*native_func"
- $(NM) $(TMPDIR)/libbundled.a | $(CGREP) -e "U _*native_func"
- $(NM) $(TMPDIR)/libbundled.rlib | $(CGREP) -e "T _*native_func"
- $(NM) $(TMPDIR)/libbundled.rlib | $(CGREP) -e "U _*native_func"
-
- # Build a staticlib and a rlib, the `native_func` symbol will not be bundled into it
- $(RUSTC) non-bundled.rs --crate-type=staticlib --crate-type=rlib
- $(NM) $(TMPDIR)/libnon_bundled.a | $(CGREP) -ve "T _*native_func"
- $(NM) $(TMPDIR)/libnon_bundled.a | $(CGREP) -e "U _*native_func"
- $(NM) $(TMPDIR)/libnon_bundled.rlib | $(CGREP) -ve "T _*native_func"
- $(NM) $(TMPDIR)/libnon_bundled.rlib | $(CGREP) -e "U _*native_func"
-
- # Build a cdylib, `native-staticlib` will not appear on the linker line because it was bundled previously
- # The cdylib will contain the `native_func` symbol in the end
- $(RUSTC) cdylib-bundled.rs --crate-type=cdylib --print link-args | $(CGREP) -ve '-l[" ]*native-staticlib'
- $(NM) $(call DYLIB,cdylib_bundled) | $(CGREP) -e "[Tt] _*native_func"
-
- # Build a cdylib, `native-staticlib` will appear on the linker line because it was not bundled previously
- # The cdylib will contain the `native_func` symbol in the end
- $(RUSTC) cdylib-non-bundled.rs --crate-type=cdylib --print link-args | $(CGREP) -e '-l[" ]*native-staticlib'
- $(NM) $(call DYLIB,cdylib_non_bundled) | $(CGREP) -e "[Tt] _*native_func"
diff --git a/src/test/run-make/native-link-modifier-bundle/bundled.rs b/src/test/run-make/native-link-modifier-bundle/bundled.rs
deleted file mode 100644
index 0bbae8752..000000000
--- a/src/test/run-make/native-link-modifier-bundle/bundled.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#[link(name = "native-staticlib", kind = "static", modifiers = "+bundle")]
-extern "C" {
- pub fn native_func();
-}
-
-#[no_mangle]
-pub extern "C" fn wrapped_func() {
- unsafe {
- native_func();
- }
-}
diff --git a/src/test/run-make/native-link-modifier-bundle/cdylib-bundled.rs b/src/test/run-make/native-link-modifier-bundle/cdylib-bundled.rs
deleted file mode 100644
index 729130916..000000000
--- a/src/test/run-make/native-link-modifier-bundle/cdylib-bundled.rs
+++ /dev/null
@@ -1 +0,0 @@
-extern crate bundled;
diff --git a/src/test/run-make/native-link-modifier-bundle/cdylib-non-bundled.rs b/src/test/run-make/native-link-modifier-bundle/cdylib-non-bundled.rs
deleted file mode 100644
index 1df81fd10..000000000
--- a/src/test/run-make/native-link-modifier-bundle/cdylib-non-bundled.rs
+++ /dev/null
@@ -1 +0,0 @@
-extern crate non_bundled;
diff --git a/src/test/run-make/native-link-modifier-bundle/native-staticlib.c b/src/test/run-make/native-link-modifier-bundle/native-staticlib.c
deleted file mode 100644
index d300fdf1c..000000000
--- a/src/test/run-make/native-link-modifier-bundle/native-staticlib.c
+++ /dev/null
@@ -1 +0,0 @@
-void native_func() {}
diff --git a/src/test/run-make/native-link-modifier-bundle/non-bundled.rs b/src/test/run-make/native-link-modifier-bundle/non-bundled.rs
deleted file mode 100644
index 8181e6387..000000000
--- a/src/test/run-make/native-link-modifier-bundle/non-bundled.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#[link(name = "native-staticlib", kind = "static", modifiers = "-bundle")]
-extern "C" {
- pub fn native_func();
-}
-
-#[no_mangle]
-pub extern "C" fn wrapped_func() {
- unsafe {
- native_func();
- }
-}