Skip to content

LLVM warnings on mips* when using -C target-cpu=native #61440

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
infinity0 opened this issue Jun 1, 2019 · 3 comments
Closed

LLVM warnings on mips* when using -C target-cpu=native #61440

infinity0 opened this issue Jun 1, 2019 · 3 comments
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-MIPS Target: MIPS processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@infinity0
Copy link
Contributor

This is causing the cargo 0.35.0 tests to fail on mips* - e.g. mips64el.

$ rustc --version
rustc 1.34.2
$ cat hello.rs
fn main() {}
$ rustc -C target-cpu=native hello.rs
'generic' is not a recognized processor for this target (ignoring processor)
'generic' is not a recognized processor for this target (ignoring processor)
'generic' is not a recognized processor for this target (ignoring processor)
'generic' is not a recognized processor for this target (ignoring processor)
'generic' is not a recognized processor for this target (ignoring processor)
[..]
@infinity0
Copy link
Contributor Author

Seems related to #53322 but I wasn't sure how to adapt the fix from there to this.

@infinity0
Copy link
Contributor Author

@alexcrichton Looks like your solution in #53642 relies on using LLVM's llvm::sys::getHostCPUName however on mips* this returns "generic":

$ cat lol.cc
#include <llvm/Support/Host.h>
#include <stdio.h>

using namespace llvm;

int main() {
  printf("%s\n", sys::getHostCPUName());
}
$ g++ -I/usr/lib/llvm-7/include lol.cc -lLLVM-7 && ./a.out
generic

(on my own intel box this returns skylake)

@jonas-schievink jonas-schievink added A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-MIPS Target: MIPS processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 1, 2019
infinity0 added a commit to infinity0/cargo that referenced this issue Jul 20, 2019
bors added a commit to rust-lang/cargo that referenced this issue Jul 23, 2019
@ehuss ehuss mentioned this issue Jul 23, 2019
bors added a commit that referenced this issue Jul 26, 2019
Update cargo

11 commits in e3563dbdcd2e370bc4f11d080f739d82d25773fd..d0f828419d6ce6be21a90866964f58eb2c07cd56
2019-07-16 19:22:44 +0000 to 2019-07-23 21:58:59 +0000
- Remove include/exclude glob warning. (rust-lang/cargo#7170)
- Optimize lock file format for git merge conflicts (rust-lang/cargo#7070)
- Set up CI with Azure Pipelines (rust-lang/cargo#7139)
- Force clippy to run. (rust-lang/cargo#7157)
- Work around #61440 (rust-lang/cargo#7158)
- initial working version of cargo fix --clippy (rust-lang/cargo#7069)
- Optimize runtime of `#[cargo_test_macro]` (rust-lang/cargo#7146)
- Don't fail if we can't acquire readonly lock (rust-lang/cargo#7149)
- Add support for multiple --features options (rust-lang/cargo#7084)
- Fix a typo in an env var name (rust-lang/cargo#7145)
- Add a way to disable all nightly tests (rust-lang/cargo#7142)
@workingjubilee
Copy link
Member

Checking reports for newer versions like Debian Bullseye, the current stable release, buildd appears to pass this for remaining mips* architectures. Closing on the assumption that this was cleared.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-MIPS Target: MIPS processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants