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

`cargo doc` ignores build script #2175

Open
rasendubi opened this issue Nov 28, 2015 · 2 comments
Open

`cargo doc` ignores build script #2175

rasendubi opened this issue Nov 28, 2015 · 2 comments
Labels

Comments

@rasendubi
Copy link

@rasendubi rasendubi commented Nov 28, 2015

I have the libcore in a custom location because I'm cross-compiling to a custom target. I specify the link path with a build script. My library builds fine but generating documentation with cargo doc --target=thumbv7em-none-eabi fails because it can't find libcore. From --verbose I see cargo doesn't run my build script and doesn't pass my link directory.

@rasendubi
Copy link
Author

@rasendubi rasendubi commented Apr 11, 2017

Still an issue.

I also forgot to say it has worked fine somewhen before Nov 28, 2015.

@rasendubi
Copy link
Author

@rasendubi rasendubi commented Apr 28, 2017

Found a workaround. rustc and rustdoc flags can be set using RUSTFLAGS and RUSTDOCFLAGS environment variables respectively.

So in my case, I used the following command to specify my library directory:

RUSTFLAGS="-L lib/thumbv7em-none-eabi" RUSTDOCFLAGS="-L lib/thumbv7em-none-eabi" cargo doc --target=thumbv7em-none-eabi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.