You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #14499 - felixmoebius:rustc-crate-type-parsing, r=weihanglo
Fix parsing of comma separated values in --crate-type flag
### What does this PR try to resolve?
According to the documentation the `--crate-type` flag accepts a comma separated list of crate types. However, these are never actually split into individual items and passed verbatim to rustc.
Since cargo fails to associate cases such as 'staticlib,cdylib' to a specific crate type internally, it has to invoke rustc to determine the output file types for this unknown crate type, which returns only the first file type of the first crate type in the list. Consequently cargo will be looking only for a single '.a' artifact on Linux to be copied to the target directory.
Fix this by splitting the list of provided crate types into individual items before further processing them.
Fixes#14498
### How should we test and review this PR?
Updated corresponding test cases
### Additional information
0 commit comments