File: dox.sh

package info (click to toggle)
rustc-web 1.85.0%2Bdfsg3-1~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,759,988 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,056; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (41 lines) | stat: -rwxr-xr-x 1,297 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash

# Builds documentation for all target triples that we have a registered URL for
# in liblibc. This scrapes the list of triples to document from `src/lib.rs`
# which has a bunch of `html_root_url` directives we pick up.

set -ex

dox() {
  if [ "$CI" != "" ]; then
    rustup target add "${1}" || true
  fi

  cargo clean --target "${1}"

  cargo build --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
  cargo build --verbose --target "${1}" --manifest-path crates/std_detect/Cargo.toml

  cargo doc --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
  cargo doc --verbose --target "${1}" --manifest-path crates/std_detect/Cargo.toml
}

if [ -z "$1" ]; then
  dox i686-unknown-linux-gnu
  dox x86_64-unknown-linux-gnu
  # Disabled temporarily,
  # See https://github.com/rust-lang/rust/issues/134511
  #dox armv7-unknown-linux-gnueabihf
  dox aarch64-unknown-linux-gnu
  dox powerpc-unknown-linux-gnu
  dox powerpc64le-unknown-linux-gnu
  dox loongarch64-unknown-linux-gnu
  # MIPS targets disabled since they are dropped to tier 3.
  # See https://github.com/rust-lang/compiler-team/issues/648
  #dox mips-unknown-linux-gnu
  #dox mips64-unknown-linux-gnuabi64
  dox wasm32-unknown-unknown
  dox nvptx64-nvidia-cuda
else
  dox "${1}"
fi