Skip to content

False negative comparing targets with equivalent paths #27594

New issue

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

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

Already on GitHub? # to your account

Closed
JustAPerson opened this issue Aug 8, 2015 · 2 comments
Closed

False negative comparing targets with equivalent paths #27594

JustAPerson opened this issue Aug 8, 2015 · 2 comments

Comments

@JustAPerson
Copy link
Contributor

Imagine a directory structure such as:

├── main.rs
├── target.json
├── libthing/
│   ├── lib.rs

Where main.rs depends on the separate crate thing

cd libthing/ && rustc lib.rs --target ../target.json
rustc main.rs --target target.json --extern  thing=libthing/libthing.rlib

You'll get an error that looks like this:

main.rs:1  error: couldn't find crate `thing` with expected target triple target.json
main.rs:1  extern crate thing;

when compiling main.rs, rustc expects --target ../target.json instead of the equivalent path in the correct working directory.

tl;dr It seems only the exact argument of --target is stored in the .rlib instead of the actual contents of the json file.

@Diggsey
Copy link
Contributor

Diggsey commented Aug 8, 2015

dup of #24666 ?

@JustAPerson
Copy link
Contributor Author

Seems so. I'll close in favor of that issue.

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

No branches or pull requests

2 participants