Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add RISC-V support #428

Merged
merged 1 commit into from
Aug 7, 2019
Merged

Add RISC-V support #428

merged 1 commit into from
Aug 7, 2019

Conversation

laanwj
Copy link
Contributor

@laanwj laanwj commented Aug 7, 2019

Automatically choose the most common name for the toolchain, and add the command-line arguments to generate code that is compatible with the chosen architecture.

Fixes #397 by @XvR-Technolution.

Automatically choose the most common name for the toolchain, and add the
command-line arguments to generate code that is compatible with the
chosen architecture.

Fixes #397.
@alexcrichton alexcrichton merged commit f6f6c81 into rust-lang:master Aug 7, 2019
@alexcrichton
Copy link
Member

Thanks!

Centril added a commit to Centril/rust that referenced this pull request Nov 15, 2019
Update cc, git2, num_cpus.

This updates the `cc` crate, bringing in better parallel building support. Also updates `git2` which enables the parallel feature. (Note: I don't expect it will have a significant impact on build time, but seems good to update anyways.)

The main thorn is that `cc` gained knowledge about RISC-V architectures (rust-lang/cc-rs#428, rust-lang/cc-rs#429, rust-lang/cc-rs#430), but the builders on CI do not have the riscv C compiler installed. This means that bootstraps' cc detection was finding a C compiler that isn't installed, and fails.

The solution here is to override the cc detection to `false`. The C compiler isn't actually used on riscv platforms. AFAIK, the only location would be compiler_builtins, and it currently forces C support off (https://github.com/rust-lang/compiler-builtins/blob/a533ae9c5aa325db209659679535fe1f186eae81/build.rs#L49-L55).

Other possible solutions:
- Add the override in cc_detect for riscv (or any "no-C" platform like wasm32 and nvptx)
- Install and use the appropriate c compiler. I tried this the `g++-riscv64-linux-gnu` package, but it failed missing some header file.

Closes rust-lang#66232
bors added a commit to rust-lang/rust that referenced this pull request Nov 16, 2019
Update cc, git2, num_cpus.

This updates the `cc` crate, bringing in better parallel building support. Also updates `git2` which enables the parallel feature. (Note: I don't expect it will have a significant impact on build time, but seems good to update anyways.)

The main thorn is that `cc` gained knowledge about RISC-V architectures (rust-lang/cc-rs#428, rust-lang/cc-rs#429, rust-lang/cc-rs#430), but the builders on CI do not have the riscv C compiler installed. This means that bootstraps' cc detection was finding a C compiler that isn't installed, and fails.

The solution here is to override the cc detection to `false`. The C compiler isn't actually used on riscv platforms. AFAIK, the only location would be compiler_builtins, and it currently forces C support off (https://github.com/rust-lang/compiler-builtins/blob/a533ae9c5aa325db209659679535fe1f186eae81/build.rs#L49-L55).

Other possible solutions:
- Add the override in cc_detect for riscv (or any "no-C" platform like wasm32 and nvptx)
- Install and use the appropriate c compiler. I tried this the `g++-riscv64-linux-gnu` package, but it failed missing some header file.

Closes #66232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing RISCV support
2 participants