mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
add alt argument format for detecting cargo build phase
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
df3eb95d4f
commit
4fbbfe5d30
1 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,16 @@ pub(crate) fn get_simple_settings(args: &[Meta]) -> HashMap<String, String> {
|
|||
}
|
||||
|
||||
pub(crate) fn is_cargo_build() -> bool {
|
||||
legacy_is_cargo_build()
|
||||
|| std::env::args()
|
||||
.skip_while(|flag| !flag.starts_with("--emit"))
|
||||
.nth(1)
|
||||
.iter()
|
||||
.flat_map(|flag| flag.split(','))
|
||||
.any(|elem| elem == "link")
|
||||
}
|
||||
|
||||
pub(crate) fn legacy_is_cargo_build() -> bool {
|
||||
std::env::args()
|
||||
.find(|flag| flag.starts_with("--emit"))
|
||||
.as_ref()
|
||||
|
|
Loading…
Add table
Reference in a new issue