rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.66k stars 12.48k forks source link

atomic-lock-free test doesn't account for LLVM support #35023

Closed cuviper closed 8 years ago

cuviper commented 8 years ago

In run-make/atomic-lock-free/Makefile, it attempts to build its script for many different architectures. However, when using an external LLVM build, it may not have all architectures available, so the test will fail despite anything Rust could do. For example, on Fedora 24 I have:

$ llvm-config --targets-built
X86 AMDGPU PowerPC NVPTX SystemZ AArch64 ARM BPF CppBackend

In particular this doesn't have "Mips", so the mips and mipsel targets will fail in atomic-lock-free. It would be nicer if this test only attempted architectures that are included in one's build of LLVM.

nagisa commented 8 years ago

See https://github.com/rust-lang/rust/issues/34962 (that would be a first step to fix the issue).

Rustc currently requires LLVM to support x86, aarch64, arm, mips, powerpc and nacl targets. You cannot omit any of these unless you patch rustc code in various places.

sanxiyn commented 8 years ago

We "sort of" support LLVM configured with different targets since #27937. It is not the case we don't have any code to support that use case.

cuviper commented 8 years ago

Thanks for the links.

@nagisa Where else would you expect problems? I found the entire "make check" was fine except for this one atomic-lock-free test.

Anyway, Fedora's LLVM maintainers agreed to add "Mips" next time they rebuild, so I guess this isn't a huge issue for me. But if Rust ever decides to add another "required" target, it would be good to understand how urgent that is to comply.