1
Fork 0

Lib kind -l link-arg:

arbitrary link argument like -C link-arg, but respecting relative order to other `-l` options, unstable
This commit is contained in:
Daniil Belov 2022-07-19 12:00:28 +03:00
parent 9ed0bf9f2b
commit 7d4a98e61a
22 changed files with 115 additions and 20 deletions

View file

@ -34,6 +34,9 @@ pub enum NativeLibKind {
/// Whether the framework will be linked only if it satisfies some undefined symbols
as_needed: Option<bool>,
},
/// Argument which is passed to linker, relative order with libraries and other arguments
/// is preserved
LinkArg,
/// The library kind wasn't specified, `Dylib` is currently used as a default.
Unspecified,
}
@ -47,7 +50,7 @@ impl NativeLibKind {
NativeLibKind::Dylib { as_needed } | NativeLibKind::Framework { as_needed } => {
as_needed.is_some()
}
NativeLibKind::RawDylib | NativeLibKind::Unspecified => false,
NativeLibKind::RawDylib | NativeLibKind::Unspecified | NativeLibKind::LinkArg => false,
}
}
}