-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
"x.py doc --stage 0" fails with compiler-docs enabled #74976
Comments
./x.py doc
, even after ./x.py clean
:
If you pass |
@jyn514 that worked |
Fixing this properly looks like it will be quite tricky. Some of the complexity stems from the fact that the As an aside, if this is fixed to support stage0, this line will probably need to be changed to |
I suspect that rustdoc always setting the sysroot might in fact be a bug, or at least unintentional - it seems like the two should be the same probably? |
|
What platform are you on? There might be some weird |
I am on x86_64-unknown-linux-gnu, Debian unstable. |
Hmm, I can't reproduce locally and I have the same link in library/std. Not sure what's going on, I'm on |
This makes it seem like it should be independent of the platform: rust/library/std/src/os/mod.rs Lines 7 to 22 in 5b04bbf
rust/library/std/src/sys/mod.rs Lines 60 to 82 in 5b04bbf
|
Here is my config.toml, just in case that makes a difference [build]
compiler-docs = true
extended = true
tools = [ "clippy", "rustfmt", "rust-analyzer" ]
target = [ "wasm32-unknown-unknown" ]
[rust]
incremental = true
lld = true |
Ah ok, this is because you're targeting wasm - if you look at rust/library/std/src/sys/mod.rs Line 68 in 5b04bbf
unix_ext at all for that target.
The different from before is that the links would fail silently; now they are failing noisily. I'm not sure the best way to fix this ... from the comments it seems like adding |
Is there a way of specifying which target to build docs for in |
|
Note also that I no longer experience the initial issue... no need to specify |
I caught this bug. My config.toml: [llvm]
optimize = true
release-debuginfo = false
assertions = false
ninja = true
targets = "X86;Mips;NVPTX;RISCV;BPF;AArch64;WebAssembly"
experimental-targets = ""
link-shared = true
[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["i686-unknown-linux-gnu","x86_64-unknown-linux-gnu","wasm32-unknown-unknown"]
docs = true
compiler-docs = true
submodules = false
python = "python3.7"
locked-deps = true
vendor = false
extended = true
tools = ["rust-analyzer","rustfmt","rls","miri","clippy","cargo",]
verbose = 2
sanitizers = false
profiler = false
cargo-native-static = false
[install]
prefix = "/usr"
libdir = "lib64/rust-9999"
docdir = "share/doc/rust-9999"
mandir = "share/rust-9999/man"
[rust]
optimize = true
debug = false
debug-assertions = false
debuginfo-level-rustc = 0
backtrace = true
incremental = false
default-linker = "x86_64-pc-linux-gnu-gcc"
parallel-compiler = false
rpath = false
verbose-tests = true
optimize-tests = true
codegen-tests = true
dist-src = false
ignore-git = false
lld = false
backtrace-on-ice = true
jemalloc = false
[dist]
src-tarball = false
[target.i686-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
linker = "x86_64-pc-linux-gnu-gcc"
ar = "x86_64-pc-linux-gnu-ar"
llvm-config = "/usr/lib/llvm/10/bin/llvm-config"
[target.x86_64-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
linker = "x86_64-pc-linux-gnu-gcc"
ar = "x86_64-pc-linux-gnu-ar"
llvm-config = "/usr/lib/llvm/10/bin/llvm-config"
[target.wasm32-unknown-unknown]
linker = "lld" Failed command:
Commit: 683d1bc |
@o01eg that's not enough info to be sure it's the same bug - can you post the output about 5 lines up that says why it failed to document? |
@jyn514 Part of log with error:
|
Same issue as #74976 (comment), don't pass --target wasm32. |
It's a part of |
Set deny-warnings = false, then: https://github.com/rust-lang/rust/blob/master/config.toml.example#L442. If you want to fix the root issue please open a separate bug for that, it's not trivial to fix and is not related to the issue you're commenting on. |
This should unbreak USE="doc wasm" build and allow to aunmask doc useflag, which has been masked for quite some time. rust-lang/rust#74976 rust-lang/rust#76526 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev <[email protected]>
Fix `x doc --stage 0 compiler` Eric figured out the fix to this almost 2 years ago, I just didn't read his comment carefully enough at the timme. The issue was that fake rustc and fake rustdoc were inconsistent about when they passed `--sysroot` to the real compiler. Change them to consistently only pass it when `--target` is present. cc rust-lang#74976 (comment) Fixes rust-lang#79980 r? `@ehuss`
Fix `x doc --stage 0 compiler` Eric figured out the fix to this almost 2 years ago, I just didn't read his comment carefully enough at the timme. The issue was that fake rustc and fake rustdoc were inconsistent about when they passed `--sysroot` to the real compiler. Change them to consistently only pass it when `--target` is present. cc rust-lang#74976 (comment) Fixes rust-lang#79980 r? ``@ehuss``
Just bumped onto this with
./x.py doc
, even after./x.py clean
:Here is my config.toml
Originally posted by @tshepang in #59105 (comment)
The text was updated successfully, but these errors were encountered: