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

Comments

Projects
None yet
2 participants
@rasendubi

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

This comment has been minimized.

Show comment
Hide comment
@rasendubi

rasendubi Apr 11, 2017

Still an issue.

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

Still an issue.

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

@rasendubi

This comment has been minimized.

Show comment
Hide comment
@rasendubi

rasendubi 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

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