Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify crate-type by target in .cargo/config #5996

Closed
prographo opened this issue Sep 8, 2018 · 2 comments
Closed

Specify crate-type by target in .cargo/config #5996

prographo opened this issue Sep 8, 2018 · 2 comments

Comments

@prographo
Copy link

I believe I have found what I am looking for, a way of specifying the crate-type for a specific target.

In .cargo/config:

[target.aarch64-linux-android]
ar = "/pp/NDK/arm64/bin/aarch64-linux-android-ar"
linker = "/pp/NDK/arm64/bin/aarch64-linux-android-clang"
crate-type = "cdylib"

However:

cargo build --target aarch64-linux-android --release
error: expected a table, but found a string for `crate-type` in /pp/fast/fast-c/.cargo/config

Clearly it has been programmed to recognise crate-type, but how to specify correctly?

@prographo
Copy link
Author

Please save me from these error messages:

warning: dropping unsupported crate type cdylib for target x86_64-apple-ios
warning: dropping unsupported crate type cdylib for target i386-apple-ios
etc.

I'm diagnosed OCD, error messages cause me physical pain.

@alexcrichton
Copy link
Member

I'm going to close this in favor of #4881 as I believe it's a duplicate. Whiel it looks like Cargo recognizes crate-type it's actually thinking that crate-type is a native library override

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants