about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-15 17:24:07 +0100
committerGitHub <noreply@github.com>2024-03-15 17:24:07 +0100
commit47be8e8b8b371995ebf096dddf6b48dcbd6348c2 (patch)
treea47666e7398b52eae48558c23978947bb35910b0 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentaccc516128b21e960b1a7af45393e9acdd184890 (diff)
parentd02e66ddf0f1b0d436b3a8374479ec8efbe4b1db (diff)
downloadrust-47be8e8b8b371995ebf096dddf6b48dcbd6348c2.tar.gz
rust-47be8e8b8b371995ebf096dddf6b48dcbd6348c2.zip
Rollup merge of #114651 - tmfink:rustdoc-rustc-wrapper, r=GuillaumeGomez
rustdoc: add `--test-builder-wrapper` arg to support wrappers such as RUSTC_WRAPPER when building doctests

Currently, `rustdoc` builds test crates with `rustc` directly instead of using [`RUSTC_WRAPPER`](https://doc.rust-lang.org/cargo/reference/config.html#buildrustc-wrapper) (if any is set).

This causes build issues in build systems that use `cargo` but tweak linking flags by setting the `RUSTC_WRAPPER` environment variable.

This change is not meant to be final--it's only a minimal proof of concept.
Please advise on the best way to proceed.

Open questions:
- [x] Does supporting the `rustc` wrappers make sense?
    - yes, `cargo-miri` for example needs a "hack" to workaround the issue
- [X] What environment variable(s) should be read for the rustc wrapper? Should `rustdoc` [use the same names as `cargo`](https://doc.rust-lang.org/cargo/reference/config.html#buildrustc-wrapper)?
    - None, since `rustdoc` takes arguments
- [X] What name should be used for a `rustdoc` CLI option?
    - `--test-builder-wrapper`
- [X] Should a separate workspace wrapper (like `RUSTC_WORKSPACE_WRAPPER`) be supported?
    - `--test-builder-wrapper` can be passed multiple times to get multiple wrappers passed
- [X] How/where should this be documented? It's not obvious to all users that `cargo doc` actually causes `rustdoc` to compile tests with rust
    - Added doc to `src/doc/rustdoc/src/command-line-arguments.md` per `@GuillaumeGomez`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions