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

Cannot test dylib #2890

Closed
MarkSwanson opened this issue Jul 17, 2016 · 5 comments
Closed

Cannot test dylib #2890

MarkSwanson opened this issue Jul 17, 2016 · 5 comments

Comments

@MarkSwanson
Copy link

Cargo will create DSOs and compile src/bin/*rs files just fine (which also run fine).

However, Cargo is unable to compile/run test programs for crates that have [lib] crate-type = ["dylib"].

I can not add rlib - if I do then any dependent crates will only link statically - and they MUST link this crate dynamically.

I tried to craft my own rustc, but it seems the thing blocking me is '--test'.

Is there any way at all to write tests against crates with crate-type = ["dylib"] ?

Thanks.

@alexcrichton
Copy link
Member

I think this may actually be a bug in the compiler right now. To be clear, you're talking about a tests/*.rs test and a crate which is a dylib?

@MarkSwanson
Copy link
Author

Yes, exactly.

@MarkSwanson
Copy link
Author

Would it help if I logged a bug with rustc and referenced this issue?

@alexcrichton
Copy link
Member

Oh sure yeah, I opened up an issue here -- rust-lang/rust#34909

@carols10cents
Copy link
Member

Sounds like this issue has been replaced by the rust-lang/rust issue rust-lang/rust#34909 so I'm closing this one. Please reopen if there's a cargo component that needs to be changed once that issue is fixed that I'm missing. Thanks!

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

3 participants