Repository: rust
Issue: liballoc built with `-Csplit-debuginfo=unpacked` despite not being supported on riscv32imc-unknown-none-elf
Labels: A-debuginfo,T-bootstrap,O-riscv

I've only observed this on Mac hosts, not Linux. (Are we mixing up host and target somewhere?)

Given the following config.toml:

```
# Includes one of the default files in src/bootstrap/defaults
profile = "library"
changelog-seen = 2

[rust]
debuginfo-level-std = 2

[target.riscv32imc-unknown-none-elf]
cc = "/usr/bin/clang"
cxx = "/usr/bin/clang++"
linker = "/usr/bin/clang++"
```

I get this error:

```
➜  rust git:(master) ✗ ./x.py build library/alloc --target riscv32imc-unknown-none-elf
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.12s
Building stage0 library artifacts {alloc} (aarch64-apple-darwin -> riscv32imc-unknown-none-elf)
   Compiling core v0.0.0 (/Users/tmandry/code/rust/library/core)
   Compiling rustc-std-workspace-core v1.99.0 (/Users/tmandry/code/rust/library/rustc-std-workspace-core)
   Compiling compiler_builtins v0.1.92
error: A dwo section may not contain relocations

   Compiling alloc v0.0.0 (/Users/tmandry/code/rust/library/alloc)
error: could not compile `compiler_builtins` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `core` (lib) due to previous error
error: could not compile `alloc` (lib) due to previous error
Build completed unsuccessfully in 0:00:08
```

Rerunning with `-v` reveals that rustc is invoked with `-Csplit-debuginfo=unpacked`.

<details>
<summary>Verbose output</summary>

```
➜  rust git:(master) ✗ ./x.py build library/alloc --target riscv32imc-unknown-none-elf -v
Building bootstrap
running: /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/cargo build --manifest-path /Users/tmandry/code/rust/src/bootstrap/Cargo.toml --verbose
       Fresh cfg-if v1.0.0
       Fresh unicode-ident v1.0.0
       Fresh version_check v0.9.4
       Fresh bitflags v1.3.2
       Fresh libc v0.2.140
       Fresh cc v1.0.73
       Fresh once_cell v1.12.0
       Fresh proc-macro2 v1.0.56
       Fresh memchr v2.5.0
       Fresh typenum v1.15.0
       Fresh pkg-config v0.3.25
       Fresh io-lifetimes v1.0.9
       Fresh errno v0.3.0
       Fresh quote v1.0.26
       Fresh generic-array v0.14.5
       Fresh aho-corasick v0.7.18
       Fresh anstyle v1.0.0
       Fresh regex-syntax v0.6.26
       Fresh clap_lex v0.4.1
       Fresh syn v2.0.8
       Fresh heck v0.4.1
       Fresh clap_builder v4.2.4
       Fresh crypto-common v0.1.3
       Fresh serde v1.0.160
       Fresh regex v1.5.6
       Fresh log v0.4.17
       Fresh block-buffer v0.10.2
       Fresh clap_derive v4.2.0
       Fresh bstr v0.2.17
       Fresh rustix v0.37.6
       Fresh fnv v1.0.7
       Fresh same-file v1.0.6
       Fresh lzma-sys v0.1.17
       Fresh digest v0.10.3
       Fresh clap v4.2.4
       Fresh globset v0.4.8
       Fresh walkdir v2.3.2
       Fresh crossbeam-utils v0.8.14
       Fresh thread_local v1.1.4
       Fresh cpufeatures v0.2.5
       Fresh filetime v0.2.16
       Fresh xattr v0.2.3
       Fresh ryu v1.0.10
       Fresh itoa v1.0.2
       Fresh lazy_static v1.4.0
       Fresh clap_complete v4.2.2
       Fresh semver v1.0.17
       Fresh sha2 v0.10.2
       Fresh serde_derive v1.0.160
       Fresh xz2 v0.1.6
       Fresh ignore v0.4.18
       Fresh tar v0.4.38
       Fresh serde_json v1.0.81
       Fresh fd-lock v3.0.11
       Fresh is-terminal v0.4.6
       Fresh toml v0.5.9
       Fresh object v0.31.1
       Fresh cmake v0.1.48
       Fresh termcolor v1.2.0
       Fresh build_helper v0.1.0 (/Users/tmandry/code/rust/src/tools/build_helper)
       Fresh hex v0.4.3
       Fresh opener v0.5.0
       Fresh bootstrap v0.0.0 (/Users/tmandry/code/rust/src/bootstrap)
    Finished dev [unoptimized] target(s) in 0.07s
running: /Users/tmandry/code/rust/build/bootstrap/debug/bootstrap build library/alloc --target riscv32imc-unknown-none-elf -v
finding compilers
CC_aarch64-apple-darwin = "cc"
CFLAGS_aarch64-apple-darwin = ["-ffunction-sections", "-fdata-sections", "-fPIC", "-arch", "arm64", "-stdlib=libc++"]
CXX_aarch64-apple-darwin = "c++"
CXXFLAGS_aarch64-apple-darwin = ["-ffunction-sections", "-fdata-sections", "-fPIC", "-arch", "arm64", "-stdlib=libc++"]
AR_aarch64-apple-darwin = "ar"
CC_riscv32imc-unknown-none-elf = "/usr/bin/clang"
CFLAGS_riscv32imc-unknown-none-elf = ["-ffunction-sections", "-fdata-sections", "--target=riscv32imc-unknown-none-elf"]
CXX_riscv32imc-unknown-none-elf = "/usr/bin/clang++"
CXXFLAGS_riscv32imc-unknown-none-elf = ["-ffunction-sections", "-fdata-sections", "--target=riscv32imc-unknown-none-elf"]
AR_riscv32imc-unknown-none-elf = "/usr/bin/ar"
running sanity check
learning about cargo
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot to avoid caching bugs
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/riscv32imc-unknown-none-elf/lib to avoid caching bugs
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/aarch64-apple-darwin/lib to avoid caching bugs
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot to avoid caching bugs
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/riscv32imc-unknown-none-elf/lib to avoid caching bugs
Removing sysroot /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot/lib/rustlib/aarch64-apple-darwin/lib to avoid caching bugs
Building stage0 library artifacts {alloc} (aarch64-apple-darwin -> riscv32imc-unknown-none-elf)
running: cd "/Users/tmandry/code/rust" && AR_riscv32imc_unknown_none_elf="/usr/bin/ar" CARGO_INCREMENTAL="1" CARGO_PROFILE_RELEASE_DEBUG="2" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false" CARGO_TARGET_DIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std" CARGO_TARGET_RISCV32IMC_UNKNOWN_NONE_ELF_LINKER="/usr/bin/clang++" CC_riscv32imc_unknown_none_elf="/usr/bin/clang" CFG_COMPILER_HOST_TRIPLE="riscv32imc-unknown-none-elf" CFG_RELEASE_CHANNEL="dev" CFLAGS_riscv32imc_unknown_none_elf="-ffunction-sections -fdata-sections --target=riscv32imc-unknown-none-elf" CXXFLAGS_riscv32imc_unknown_none_elf="-ffunction-sections -fdata-sections --target=riscv32imc-unknown-none-elf" CXX_riscv32imc_unknown_none_elf="/usr/bin/clang++" LIBC_CHECK_CFG="1" RANLIB_riscv32imc_unknown_none_elf="/usr/bin/ar s" REAL_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/Users/tmandry/code/rust/build/riscv32imc-unknown-none-elf/native" RUSTC="/Users/tmandry/code/rust/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/Users/tmandry/code/rust/build/tmp/extended-error-metadata" RUSTC_FORCE_UNSTABLE="1" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings" RUSTC_REAL="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" RUSTC_SNAPSHOT="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" RUSTC_STAGE="0" RUSTC_SYSROOT="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot" RUSTC_VERBOSE="1" RUSTDOC="/Users/tmandry/code/rust/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(stdarch_intel_sde) --check-cfg=values(no_fp_fmt_parse) --check-cfg=values(no_global_oom_handling) --check-cfg=values(no_rc) --check-cfg=values(no_sync) --check-cfg=values(freebsd12) --check-cfg=values(freebsd13) --check-cfg=values(backtrace_in_libstd) --check-cfg=values(target_env,\"libnx\") --check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\") -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.72.0-dev -Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\") -Zcrate-attr=warn(rust_2018_idioms)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(stdarch_intel_sde) --check-cfg=values(no_fp_fmt_parse) --check-cfg=values(no_global_oom_handling) --check-cfg=values(no_rc) --check-cfg=values(no_sync) --check-cfg=values(freebsd12) --check-cfg=values(freebsd13) --check-cfg=values(backtrace_in_libstd) --check-cfg=values(target_env,\"libnx\") --check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\") -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes -Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" RUST_TEST_THREADS="10" WINAPI_NO_BUNDLED_LIBRARIES="1" __CARGO_DEFAULT_LIB_METADATA="bootstrapstd" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/cargo" "build" "--target" "riscv32imc-unknown-none-elf" "--release" "-Zcheck-cfg=names,values,output" "-Zbinary-dep-depinfo" "-j" "10" "-v" "-p" "alloc" "--manifest-path" "/Users/tmandry/code/rust/library/alloc/Cargo.toml" "--features" " compiler-builtins-mem" "-p" "alloc" "--message-format" "json-render-diagnostics"
   Compiling core v0.0.0 (/Users/tmandry/code/rust/library/core)
     Running `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name core --edition=2021 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=6dae326047fff8df -C extra-filename=-6dae326047fff8df --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -C incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo`
       Dirty rustc-std-workspace-core v1.99.0 (/Users/tmandry/code/rust/library/rustc-std-workspace-core): the dependency core was rebuilt
   Compiling rustc-std-workspace-core v1.99.0 (/Users/tmandry/code/rust/library/rustc-std-workspace-core)
     Running `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name rustc_std_workspace_core --edition=2021 library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=fc593dfc8d04f127 -C extra-filename=-fc593dfc8d04f127 --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -C incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --extern core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcore-6dae326047fff8df.rmeta --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo`
   Compiling compiler_builtins v0.1.92
     Running `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name compiler_builtins /Users/tmandry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' --cfg 'feature="rustc-dep-of-std"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=acda6d6c8945d01d -C extra-filename=-acda6d6c8945d01d --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --extern core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/librustc_std_workspace_core-fc593dfc8d04f127.rmeta --cap-lints allow --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --cfg 'feature="unstable"' --cfg 'feature="mem"'`
error: A dwo section may not contain relocations

   Compiling alloc v0.0.0 (/Users/tmandry/code/rust/library/alloc)
     Running `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name alloc --edition=2021 library/alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="compiler-builtins-mem"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=26880db47770d3ae -C extra-filename=-26880db47770d3ae --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -C incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --extern compiler_builtins=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcompiler_builtins-acda6d6c8945d01d.rmeta --extern core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcore-6dae326047fff8df.rmeta --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo`
    Building [=============>               ] 3/6: core, compiler_builtins, alloc
Did not run successfully: exit status: 1
DYLD_LIBRARY_PATH="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" "--crate-name" "compiler_builtins" "/Users/tmandry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=195" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "codegen-units=10000" "-C" "debuginfo=2" "--cfg" "feature=\"compiler-builtins\"" "--cfg" "feature=\"core\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"mem\"" "--cfg" "feature=\"rustc-dep-of-std\"" "-Zunstable-options" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=acda6d6c8945d01d" "-C" "extra-filename=-acda6d6c8945d01d" "--out-dir" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "--target" "riscv32imc-unknown-none-elf" "-C" "linker=/usr/bin/clang++" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps" "--extern" "core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/librustc_std_workspace_core-fc593dfc8d04f127.rmeta" "--cap-lints" "allow" "--cfg=bootstrap" "-Csymbol-mangling-version=legacy" "-Zunstable-options" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(stdarch_intel_sde)" "--check-cfg=values(no_fp_fmt_parse)" "--check-cfg=values(no_global_oom_handling)" "--check-cfg=values(no_rc)" "--check-cfg=values(no_sync)" "--check-cfg=values(freebsd12)" "--check-cfg=values(freebsd13)" "--check-cfg=values(backtrace_in_libstd)" "--check-cfg=values(target_env,\"libnx\")" "--check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\")" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=unpacked" "-Cprefer-dynamic" "-Cllvm-args=-import-instr-limit=10" "-Zinline-mir" "-Clto=off" "-Cforce-unwind-tables=yes" "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" "-Z" "binary-dep-depinfo" "--cfg" "feature=\"unstable\"" "--cfg" "feature=\"mem\"" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot" "-Z" "force-unstable-if-unmarked"
-------------
error: could not compile `compiler_builtins` (lib) due to previous error

Caused by:
  process didn't exit successfully: `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name compiler_builtins /Users/tmandry/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' --cfg 'feature="rustc-dep-of-std"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=acda6d6c8945d01d -C extra-filename=-acda6d6c8945d01d --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --extern core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/librustc_std_workspace_core-fc593dfc8d04f127.rmeta --cap-lints allow --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --cfg 'feature="unstable"' --cfg 'feature="mem"'` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
    Building [==================>          ] 4/6: core, alloc
Did not run successfully: exit status: 1
DYLD_LIBRARY_PATH="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" "--crate-name" "core" "--edition=2021" "library/core/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=195" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=2" "-Zunstable-options" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=6dae326047fff8df" "-C" "extra-filename=-6dae326047fff8df" "--out-dir" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "--target" "riscv32imc-unknown-none-elf" "-C" "linker=/usr/bin/clang++" "-C" "incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps" "--cfg=bootstrap" "-Csymbol-mangling-version=legacy" "-Zunstable-options" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(stdarch_intel_sde)" "--check-cfg=values(no_fp_fmt_parse)" "--check-cfg=values(no_global_oom_handling)" "--check-cfg=values(no_rc)" "--check-cfg=values(no_sync)" "--check-cfg=values(freebsd12)" "--check-cfg=values(freebsd13)" "--check-cfg=values(backtrace_in_libstd)" "--check-cfg=values(target_env,\"libnx\")" "--check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\")" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=unpacked" "-Cprefer-dynamic" "-Cllvm-args=-import-instr-limit=10" "-Zinline-mir" "-Clto=off" "-Cforce-unwind-tables=yes" "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" "-Z" "binary-dep-depinfo" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot" "-Z" "force-unstable-if-unmarked"
-------------
error: could not compile `core` (lib) due to previous error

Caused by:
  process didn't exit successfully: `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name core --edition=2021 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=6dae326047fff8df -C extra-filename=-6dae326047fff8df --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -C incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo` (exit status: 1)
    Building [=======================>     ] 5/6: alloc
Did not run successfully: exit status: 1
DYLD_LIBRARY_PATH="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" "--crate-name" "alloc" "--edition=2021" "library/alloc/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=195" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=2" "--cfg" "feature=\"compiler-builtins-mem\"" "-Zunstable-options" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=26880db47770d3ae" "-C" "extra-filename=-26880db47770d3ae" "--out-dir" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "--target" "riscv32imc-unknown-none-elf" "-C" "linker=/usr/bin/clang++" "-C" "incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps" "-L" "dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps" "--extern" "compiler_builtins=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcompiler_builtins-acda6d6c8945d01d.rmeta" "--extern" "core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcore-6dae326047fff8df.rmeta" "--cfg=bootstrap" "-Csymbol-mangling-version=legacy" "-Zunstable-options" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(stdarch_intel_sde)" "--check-cfg=values(no_fp_fmt_parse)" "--check-cfg=values(no_global_oom_handling)" "--check-cfg=values(no_rc)" "--check-cfg=values(no_sync)" "--check-cfg=values(freebsd12)" "--check-cfg=values(freebsd13)" "--check-cfg=values(backtrace_in_libstd)" "--check-cfg=values(target_env,\"libnx\")" "--check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\")" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=unpacked" "-Cprefer-dynamic" "-Cllvm-args=-import-instr-limit=10" "-Zinline-mir" "-Clto=off" "-Cforce-unwind-tables=yes" "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" "-Z" "binary-dep-depinfo" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot" "-Z" "force-unstable-if-unmarked"
-------------
error: could not compile `alloc` (lib) due to previous error

Caused by:
  process didn't exit successfully: `/Users/tmandry/code/rust/build/bootstrap/debug/rustc --crate-name alloc --edition=2021 library/alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=195 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="compiler-builtins-mem"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=26880db47770d3ae -C extra-filename=-26880db47770d3ae --out-dir /Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps --target riscv32imc-unknown-none-elf -C linker=/usr/bin/clang++ -C incremental=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/incremental -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps -L dependency=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/release/deps --extern compiler_builtins=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcompiler_builtins-acda6d6c8945d01d.rmeta --extern core=/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std/riscv32imc-unknown-none-elf/release/deps/libcore-6dae326047fff8df.rmeta --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(freebsd13)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo` (exit status: 1)
command did not execute successfully: cd "/Users/tmandry/code/rust" && AR_riscv32imc_unknown_none_elf="/usr/bin/ar" CARGO_INCREMENTAL="1" CARGO_PROFILE_RELEASE_DEBUG="2" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false" CARGO_TARGET_DIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-std" CARGO_TARGET_RISCV32IMC_UNKNOWN_NONE_ELF_LINKER="/usr/bin/clang++" CC_riscv32imc_unknown_none_elf="/usr/bin/clang" CFG_COMPILER_HOST_TRIPLE="riscv32imc-unknown-none-elf" CFG_RELEASE_CHANNEL="dev" CFLAGS_riscv32imc_unknown_none_elf="-ffunction-sections -fdata-sections --target=riscv32imc-unknown-none-elf" CXXFLAGS_riscv32imc_unknown_none_elf="-ffunction-sections -fdata-sections --target=riscv32imc-unknown-none-elf" CXX_riscv32imc_unknown_none_elf="/usr/bin/clang++" LIBC_CHECK_CFG="1" RANLIB_riscv32imc_unknown_none_elf="/usr/bin/ar s" REAL_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/Users/tmandry/code/rust/build/riscv32imc-unknown-none-elf/native" RUSTC="/Users/tmandry/code/rust/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/Users/tmandry/code/rust/build/tmp/extended-error-metadata" RUSTC_FORCE_UNSTABLE="1" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings" RUSTC_REAL="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" RUSTC_SNAPSHOT="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/lib" RUSTC_STAGE="0" RUSTC_SYSROOT="/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0-sysroot" RUSTC_VERBOSE="1" RUSTDOC="/Users/tmandry/code/rust/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(stdarch_intel_sde) --check-cfg=values(no_fp_fmt_parse) --check-cfg=values(no_global_oom_handling) --check-cfg=values(no_rc) --check-cfg=values(no_sync) --check-cfg=values(freebsd12) --check-cfg=values(freebsd13) --check-cfg=values(backtrace_in_libstd) --check-cfg=values(target_env,\"libnx\") --check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\") -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.72.0-dev -Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\") -Zcrate-attr=warn(rust_2018_idioms)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options --check-cfg=values(bootstrap) --check-cfg=values(stdarch_intel_sde) --check-cfg=values(no_fp_fmt_parse) --check-cfg=values(no_global_oom_handling) --check-cfg=values(no_rc) --check-cfg=values(no_sync) --check-cfg=values(freebsd12) --check-cfg=values(freebsd13) --check-cfg=values(backtrace_in_libstd) --check-cfg=values(target_env,\"libnx\") --check-cfg=values(target_arch,\"asmjs\",\"spirv\",\"nvptx\",\"xtensa\") -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Zunstable-options -Csplit-debuginfo=unpacked -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Zinline-mir -Clto=off -Cforce-unwind-tables=yes -Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" RUST_TEST_THREADS="10" WINAPI_NO_BUNDLED_LIBRARIES="1" __CARGO_DEFAULT_LIB_METADATA="bootstrapstd" "/Users/tmandry/code/rust/build/aarch64-apple-darwin/stage0/bin/cargo" "build" "--target" "riscv32imc-unknown-none-elf" "--release" "-Zcheck-cfg=names,values,output" "-Zbinary-dep-depinfo" "-j" "10" "-v" "-p" "alloc" "--manifest-path" "/Users/tmandry/code/rust/library/alloc/Cargo.toml" "--features" " compiler-builtins-mem" "-p" "alloc" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
Traceback (most recent call last):
  File "/Users/tmandry/code/rust/./x.py", line 32, in <module>
    bootstrap.main()
  File "/Users/tmandry/code/rust/src/bootstrap/bootstrap.py", line 1094, in main
    bootstrap(args)
  File "/Users/tmandry/code/rust/src/bootstrap/bootstrap.py", line 1069, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/Users/tmandry/code/rust/src/bootstrap/bootstrap.py", line 184, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /Users/tmandry/code/rust/build/bootstrap/debug/bootstrap build library/alloc --target riscv32imc-unknown-none-elf -v
```

</details>

#110224 is related, but the resolution for that appears to be to fix the target definition. The definition for the riscv32imc target correctly lists the only supported option as `off`:

```
➜  rust git:(master) ✗ rustc --target riscv32imc-unknown-none-elf --print split-debuginfo
off
```

So this might actually be a cargo bug. cc @ehuss