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

Tracking issue for cross-compiling doc tests (doctest-xcompile) #7040

Open
Goirad opened this issue Jun 18, 2019 · 0 comments
Open

Tracking issue for cross-compiling doc tests (doctest-xcompile) #7040

Goirad opened this issue Jun 18, 2019 · 0 comments

Comments

@Goirad
Copy link

@Goirad Goirad commented Jun 18, 2019

Tracking issue for PR #6892.

This PR adds the unstable -Zdoctest-xcompile flag to cargo. When present, instead of skipping doctests when host != target as it does now, cargo parses the runner field for target from .cargo/config and passes that to rustdoc. See here for the companion PR in rust that adds the necessary functionality to rustdoc. The flag also enables a new unstable --enable-per-target-ignores flag in rustdoc, allowing the use of compiletest-style --ignore-foo annotations for doctests so that they are ignored on a per-target basis. The motivation for these PRs, along with another modifying compiltest and bootstrap (not yet submitted), is to allow bootstrap to utilize the many doctests found in the various crates in the rust compiler, notably libstd and libcore.

This should add uniformity and expand testsuites for projects that build for other platforms, since the runner field is already used by cargo test.

bors added a commit that referenced this issue Sep 18, 2019
Added ability to crosscompile doctests

This commit adds the ability to cross-compile and run doctests.
Like before cargo checks if target == host, the difference is that if there is a runtool defined in config.toml, it passes the information forward to rustdoc so that it can run the doctests with that tool. If no tool is defined and the target != host, cargo instead displays a message that doctests will not be compiled because of the missing runtool.

See [here](rust-lang/rust#60387) for the companion PR in the rust project that modifies rustdoc to accept the relevant options as well as allow ignoring doctests on a per target level.
Partially resolves [#6460](#6460)

See [here](#7040) for the tracking issue.
@ehuss ehuss added this to Unstable, no backers in Roadmap Dec 30, 2019
@ehuss ehuss changed the title Tracking issue for PR #6892 : Cross-compiling doc tests Tracking issue for cross-compiling doc tests (doctest-xcompile) Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
Unstable, no backers
2 participants
You can’t perform that action at this time.