Skip to content

cargo rustc --lib -- --crate-type cdylib results in crate required to be available in rlib format #7899

Closed
@dvc94ch

Description

Building examples for android works great cargo rustc --example NAME -- --crate-type cdylib. When trying cargo rustc --lib -- --crate-type cdylib I get crate required to be available in rlib format.

I found multiple closed issues here related to this #7339 #6160, and was wondering what the correct approach is. Since the crate type can be set in the Cargo.toml I think a reasonable case can be made that overriding it from the cli is in the domain of cargo features (as opposed to it's a rustc flag we won't support it)

Related to #4881.

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions