Skip to content

rustdoc fails when building rust 1.85.0 for ARM targets #137366

Description

@jpalus

Running ./x.py dist results in error on ARM 32-bit targets, works fine for aarch64 though:

arm-unknown-linux-gnueabihf:

...
error: target feature `fp-armv8` cannot be toggled with `#[target_feature]`: Rust ties `fp-armv8` to `neon`
     --> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:20668:48
      |
20668 | #[cfg_attr(target_arch = "arm", target_feature(enable = "fp-armv8,v8"))]
      |                                                ^^^^^^^^^^^^^^^^^^^^^^

error: target feature `fp-armv8` cannot be toggled with `#[target_feature]`: Rust ties `fp-armv8` to `neon`
     --> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:20688:48
      |
20688 | #[cfg_attr(target_arch = "arm", target_feature(enable = "fp-armv8,v8"))]
      |                                                ^^^^^^^^^^^^^^^^^^^^^^

error: could not document `core`

Caused by:
  process didn't exit successfully: `/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name core library/core/src/lib.rs --target arm-unknown-linux-gnueabihf -o /home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/arm-unknown-linux-gnueabihf/stage2-std/arm-unknown-linux-gnueabihf/doc/arm-unknown-linux-gnueabihf/doc --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("debug_refcell", "optimize_for_size", "panic_immediate_abort"))' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --warn=unexpected_cfgs --check-cfg 'cfg(bootstrap)' --check-cfg 'cfg(no_fp_fmt_parse)' --check-cfg 'cfg(stdarch_intel_sde)' --check-cfg 'cfg(target_arch, values("xtensa"))' --check-cfg 'cfg(feature, values(any()))' -C metadata=cc6cca0d841652cf -L dependency=/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/arm-unknown-linux-gnueabihf/stage2-std/arm-unknown-linux-gnueabihf/doc/arm-unknown-linux-gnueabihf/release/deps -L dependency=/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/arm-unknown-linux-gnueabihf/stage2-std/arm-unknown-linux-gnueabihf/doc/release/deps -C debuginfo=0 -C strip=none -Csymbol-mangling-version=legacy '--check-cfg=cfg(feature,values(any()))' -Zunstable-options '--check-cfg=cfg(bootstrap)' '--check-cfg=cfg(test)' -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version '1.85.0	(4d91de4e4	    2025-02-17)	(builtfrom	   a	    source	tarball)' '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/1.85.0/")' '-Zcrate-attr=warn(rust_2018_idioms)' --extern-html-root-url 'std_detect=https://docs.rs/std_detect/latest/' --extern-html-root-takes-precedence --resource-suffix 1.85.0 --markdown-css rust.css --markdown-no-toc --index-page /home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/src/doc/index.md -Zunstable-options` (exit status: 1)
warning: build failed, waiting for other jobs to finish...

armv7-unknown-linux-gnueabihf:

...
error: target feature `neon` cannot be toggled with `#[target_feature]`: unsound on hard-float targets because it changes float ABI
    --> library/core/src/../../stdarch/crates/core_arch/src/arm/neon.rs:1398:18
     |
1398 | #[target_feature(enable = "neon,v7,aes")]
     |                  ^^^^^^^^^^^^^^^^^^^^^^

error: target feature `neon` cannot be toggled with `#[target_feature]`: unsound on hard-float targets because it changes float ABI
    --> library/core/src/../../stdarch/crates/core_arch/src/arm/neon.rs:1415:18
     |
1415 | #[target_feature(enable = "neon,v7,aes")]
     |                  ^^^^^^^^^^^^^^^^^^^^^^

error: could not document `core`

Caused by:
  process didn't exit successfully: `/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name core library/core/src/lib.rs --target armv7-unknown-linux-gnueabihf -o /home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/armv7-unknown-linux-gnueabihf/stage2-std/armv7-unknown-linux-gnueabihf/doc/armv7-unknown-linux-gnueabihf/doc --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("debug_refcell", "optimize_for_size", "panic_immediate_abort"))' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --warn=unexpected_cfgs --check-cfg 'cfg(bootstrap)' --check-cfg 'cfg(no_fp_fmt_parse)' --check-cfg 'cfg(stdarch_intel_sde)' --check-cfg 'cfg(target_arch, values("xtensa"))' --check-cfg 'cfg(feature, values(any()))' -C metadata=4ab4e812d278f910 -L dependency=/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/armv7-unknown-linux-gnueabihf/stage2-std/armv7-unknown-linux-gnueabihf/doc/armv7-unknown-linux-gnueabihf/release/deps -L dependency=/home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/build/armv7-unknown-linux-gnueabihf/stage2-std/armv7-unknown-linux-gnueabihf/doc/release/deps -C debuginfo=0 -C strip=none -Csymbol-mangling-version=legacy '--check-cfg=cfg(feature,values(any()))' -Zunstable-options '--check-cfg=cfg(bootstrap)' '--check-cfg=cfg(test)' -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version '1.85.0	    (4d91de4e4	  2025-02-17)	    (built	from	a	   source	tarball)' '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/1.85.0/")' '-Zcrate-attr=warn(rust_2018_idioms)' --extern-html-root-url 'std_detect=https://docs.rs/std_detect/latest/' --extern-html-root-takes-precedence --resource-suffix 1.85.0 --markdown-css rust.css --markdown-no-toc --index-page /home/users/builder/rpm/BUILD/rust-1.85.0-build/rustc-1.85.0-src/src/doc/index.md -Zunstable-options` (exit status: 1)
warning: build failed, waiting for other jobs to finish...

Build is performed on aarch64 host although I think it shouldn't really matter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions