diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/run-make-fulldeps/link-cfg | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/link-cfg')
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/Makefile | 22 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs | 8 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/dep.rs | 8 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/no-deps.rs | 20 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/return1.c | 6 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/return2.c | 6 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/return3.c | 6 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/with-deps.rs | 14 | ||||
-rw-r--r-- | tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs | 14 |
9 files changed, 0 insertions, 104 deletions
diff --git a/tests/run-make-fulldeps/link-cfg/Makefile b/tests/run-make-fulldeps/link-cfg/Makefile deleted file mode 100644 index 0b25ccded..000000000 --- a/tests/run-make-fulldeps/link-cfg/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -include ../tools.mk - -all: $(call DYLIB,return1) $(call DYLIB,return2) $(call NATIVE_STATICLIB,return3) - ls $(TMPDIR) - $(BARE_RUSTC) --print cfg --target x86_64-unknown-linux-musl | $(CGREP) crt-static - - $(RUSTC) no-deps.rs --cfg foo - $(call RUN,no-deps) - $(RUSTC) no-deps.rs --cfg bar - $(call RUN,no-deps) - - $(RUSTC) dep.rs - $(RUSTC) with-deps.rs --cfg foo - $(call RUN,with-deps) - $(RUSTC) with-deps.rs --cfg bar - $(call RUN,with-deps) - - $(RUSTC) dep-with-staticlib.rs - $(RUSTC) with-staticlib-deps.rs --cfg foo - $(call RUN,with-staticlib-deps) - $(RUSTC) with-staticlib-deps.rs --cfg bar - $(call RUN,with-staticlib-deps) diff --git a/tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs b/tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs deleted file mode 100644 index 5ad66475d..000000000 --- a/tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![feature(link_cfg)] -#![crate_type = "rlib"] - -#[link(name = "return1", cfg(foo))] -#[link(name = "return3", kind = "static", cfg(bar))] -extern "C" { - pub fn my_function() -> i32; -} diff --git a/tests/run-make-fulldeps/link-cfg/dep.rs b/tests/run-make-fulldeps/link-cfg/dep.rs deleted file mode 100644 index 40de77f05..000000000 --- a/tests/run-make-fulldeps/link-cfg/dep.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![feature(link_cfg)] -#![crate_type = "rlib"] - -#[link(name = "return1", cfg(foo))] -#[link(name = "return2", cfg(bar))] -extern "C" { - pub fn my_function() -> i32; -} diff --git a/tests/run-make-fulldeps/link-cfg/no-deps.rs b/tests/run-make-fulldeps/link-cfg/no-deps.rs deleted file mode 100644 index ba5a8711a..000000000 --- a/tests/run-make-fulldeps/link-cfg/no-deps.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![feature(link_cfg)] - -#[link(name = "return1", cfg(foo))] -#[link(name = "return2", cfg(bar))] -extern "C" { - fn my_function() -> i32; -} - -fn main() { - unsafe { - let v = my_function(); - if cfg!(foo) { - assert_eq!(v, 1); - } else if cfg!(bar) { - assert_eq!(v, 2); - } else { - panic!("unknown"); - } - } -} diff --git a/tests/run-make-fulldeps/link-cfg/return1.c b/tests/run-make-fulldeps/link-cfg/return1.c deleted file mode 100644 index 41c2809ad..000000000 --- a/tests/run-make-fulldeps/link-cfg/return1.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int my_function() { - return 1; -} diff --git a/tests/run-make-fulldeps/link-cfg/return2.c b/tests/run-make-fulldeps/link-cfg/return2.c deleted file mode 100644 index 622aeaa29..000000000 --- a/tests/run-make-fulldeps/link-cfg/return2.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int my_function() { - return 2; -} diff --git a/tests/run-make-fulldeps/link-cfg/return3.c b/tests/run-make-fulldeps/link-cfg/return3.c deleted file mode 100644 index f29dc60d5..000000000 --- a/tests/run-make-fulldeps/link-cfg/return3.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int my_function() { - return 3; -} diff --git a/tests/run-make-fulldeps/link-cfg/with-deps.rs b/tests/run-make-fulldeps/link-cfg/with-deps.rs deleted file mode 100644 index 48b782815..000000000 --- a/tests/run-make-fulldeps/link-cfg/with-deps.rs +++ /dev/null @@ -1,14 +0,0 @@ -extern crate dep; - -fn main() { - unsafe { - let v = dep::my_function(); - if cfg!(foo) { - assert_eq!(v, 1); - } else if cfg!(bar) { - assert_eq!(v, 2); - } else { - panic!("unknown"); - } - } -} diff --git a/tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs b/tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs deleted file mode 100644 index 23e5926a7..000000000 --- a/tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs +++ /dev/null @@ -1,14 +0,0 @@ -extern crate dep_with_staticlib; - -fn main() { - unsafe { - let v = dep_with_staticlib::my_function(); - if cfg!(foo) { - assert_eq!(v, 1); - } else if cfg!(bar) { - assert_eq!(v, 3); - } else { - panic!("unknown"); - } - } -} |