Closed
Description
I tried this code:
; rustc +stage2 --print=target-spec-json --target loongarch64-unknown-linux-gnu -Zunstable-options
I expected to see this happen: rustc prints the target spec successfully, because it knows it exists:
; rustc +stage2 --print=target-list | grep loong
loongarch64-unknown-linux-gnu
Instead, this happened: rustc fails to load the LLVM specification:
; rustc +stage2 --print=target-spec-json --target loongarch64-unknown-linux-gnu -Zunstable-options
error: could not create LLVM TargetMachine for triple: loongarch64-unknown-linux-gnu: No available targets are compatible with triple "loongarch64-unknown-linux-gnu"
Note that this is different from the error we emit for an unrecognized target:
; rustc +stage2 --print=target-spec-json --target unknown -Zunstable-options
error: Error loading target specification: Could not find specification for target "unknown". Run `rustc --print target-list` for a list of built-in targets
Also, this only happens for local builds, because we don't use the LLVM in the rust-dev
component in rustup, only when building rustc from source.
... wtf ???
Meta
HEAD is branched from ce1073b