Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f8ea063

Browse files
committed
Auto merge of rust-lang#135336 - tshepang:patch-5, r=jieyouxu
use target feature and not target name Also, modify 1 test to test cli functionality in all targets
2 parents fb65a3e + 3e9cbc1 commit f8ea063

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/doc/rustc-dev-guide/src/tests/directives.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ settings:
188188
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
189189
16, ptr` will only run if it supports the comma-separated list of atomic
190190
widths.
191+
- `needs-dynamic-linking` - ignores if target does not support dynamic linking,
192+
meaning it cannot create `dylib` and `cdylib` crates types
191193

192194
The following directives will check LLVM support:
193195

tests/ui/invalid-compile-flags/crate-type-flag.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
//@[staticlib] compile-flags: --crate-type=staticlib
1818
//@[staticlib] check-pass
1919

20-
//@[dylib] ignore-musl (dylibs are not supported)
21-
//@[dylib] ignore-wasm (dylibs are not supported)
20+
//@[dylib] needs-dynamic-linking
2221
//@[dylib] compile-flags: --crate-type=dylib
2322
//@[dylib] check-pass
2423

25-
//@[cdylib] ignore-musl (cdylibs are not supported)
24+
//@[cdylib] needs-dynamic-linking
2625
//@[cdylib] compile-flags: --crate-type=cdylib
2726
//@[cdylib] check-pass
2827

@@ -39,9 +38,7 @@
3938
//@[multivalue] compile-flags: --crate-type=lib,rlib,staticlib
4039
//@[multivalue] check-pass
4140

42-
//@[multivalue_combined] ignore-musl (dylibs are not supported)
43-
//@[multivalue_combined] ignore-wasm (dylibs are not supported)
44-
//@[multivalue_combined] compile-flags: --crate-type=lib,rlib,staticlib --crate-type=dylib
41+
//@[multivalue_combined] compile-flags: --crate-type=lib,rlib --crate-type=staticlib
4542
//@[multivalue_combined] check-pass
4643

4744
// `proc-macro` is accepted, but `proc_macro` is not.

0 commit comments

Comments
 (0)