Closed
Description
Given that rustc now tracks target triple used to build a crate, there must be a way to pass --target
to rustdoc, otherwise it's impossible to generate documentation for cross-compiled library:
% rustdoc -o build/doc src/main.rs -L build
src/main.rs:35:1: 35:19 error: found incorrect triple for crate `core`
src/main.rs:35 extern crate core;
^~~~~~~~~~~~~~~~~~
src/main.rs:35:1: 35:19 note: expected triple of x86_64-apple-darwin
src/main.rs:35 extern crate core;
^~~~~~~~~~~~~~~~~~
src/main.rs:35:19: 35:19 note: crate `core` path #1, triple thumbv7m-linux-eabi: /Users/farcaller/src/zinc/build/libcore-caef0f5f-0.0.rlib
error: aborting due to previous error
task '<unnamed>' failed at '~Any', /Users/farcaller/temp/rust/src/libsyntax/diagnostic.rs:120
task '<main>' failed at 'called `Result::unwrap()` on an `Err` value: ~Any', /Users/farcaller/temp/rust/src/libstd/result.rs:528