add support for needs-dynamic-linking

This commit is contained in:
Pietro Albini 2023-05-17 10:41:41 +02:00
parent 04f658f3d3
commit 767c4b9ef1
No known key found for this signature in database
GPG Key ID: CD76B35F7734769E
4 changed files with 8 additions and 1 deletions

View File

@ -130,6 +130,11 @@ pub(super) fn handle_needs(
condition: config.git_hash,
ignore_reason: "ignored when git hashes have been omitted for building",
},
Need {
name: "needs-dynamic-linking",
condition: config.target_cfg().dynamic_linking,
ignore_reason: "ignored on targets without dynamic linking",
},
];
let (name, comment) = match ln.split_once([':', ' ']) {

View File

@ -4,7 +4,7 @@
// aux-build:issue-12133-dylib2.rs
// ignore-emscripten no dylib support
// ignore-musl
// ignore-sgx no dylib support
// needs-dynamic-linking
// pretty-expanded FIXME #23616

View File

@ -1,6 +1,7 @@
// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
// build-pass
// needs-profiler-support
// needs-dynamic-linking
// Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries
// with dead code and #[inline(always)].

View File

@ -7,6 +7,7 @@
// build-pass
// force-host
// no-prefer-dynamic
// needs-dynamic-linking
#![crate_type = "proc-macro"]