support link modifier as-needed for raw-dylib-elf

This commit is contained in:
usamoi
2025-08-26 16:24:29 +08:00
parent 839222065a
commit 21dd997aec
8 changed files with 82 additions and 31 deletions

View File

@@ -135,7 +135,8 @@ fn parse_and_apply_modifier(cx: &ParseNativeLibCx<'_>, modifier: &str, native_li
),
("as-needed", NativeLibKind::Dylib { as_needed })
| ("as-needed", NativeLibKind::Framework { as_needed }) => {
| ("as-needed", NativeLibKind::Framework { as_needed })
| ("as-needed", NativeLibKind::RawDylib { as_needed }) => {
cx.on_unstable_value(
"linking modifier `as-needed` is unstable",
", the `-Z unstable-options` flag must also be passed to use it",