forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#126563 - jieyouxu:rollup-7dbtmzk, r=jieyouxu
Rollup of 8 pull requests Successful merges: - rust-lang#126178 (Weekly `cargo update`) - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target) - rust-lang#126365 (Honor collapse_debuginfo for statics.) - rust-lang#126524 (bump few deps) - rust-lang#126536 (Remove unused `llvm_readobj.rs` in `run-make-support`) - rust-lang#126546 (std: move `sys_common::backtrace` to `sys`) - rust-lang#126560 (more ice tests) - rust-lang#126561 (`boxed_slice_into_iter`: tiny doc correction) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
55 changed files
with
526 additions
and
190 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
compiler/rustc_target/src/spec/targets/i686_unknown_redox.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = base::redox::opts(); | ||
base.cpu = "pentiumpro".into(); | ||
base.plt_by_default = false; | ||
base.max_atomic_width = Some(64); | ||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); | ||
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved | ||
base.stack_probes = StackProbeType::Call; | ||
|
||
Target { | ||
llvm_target: "i686-unknown-redox".into(), | ||
metadata: crate::spec::TargetMetadata { | ||
description: None, | ||
tier: None, | ||
host_tools: None, | ||
std: None, | ||
}, | ||
pointer_width: 32, | ||
data_layout: | ||
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128" | ||
.into(), | ||
arch: "x86".into(), | ||
options: base, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
library/std/src/sys_common/backtrace.rs → library/std/src/sys/backtrace.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ mod pal; | |
|
||
mod personality; | ||
|
||
pub mod backtrace; | ||
pub mod cmath; | ||
pub mod os_str; | ||
pub mod path; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
#[cfg(test)] | ||
mod tests; | ||
|
||
pub mod backtrace; | ||
pub mod fs; | ||
pub mod io; | ||
pub mod lazy_box; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# `*-unknown-redox` | ||
|
||
**Tier: 2/3** | ||
|
||
Targets for the [Redox OS](https://redox-os.org/) operating | ||
system. | ||
|
||
Target triplets available so far: | ||
|
||
- `x86_64-unknown-redox` (tier 2) | ||
- `aarch64-unknown-redox` (tier 3) | ||
- `i686-unknown-redox` (tier 3) | ||
|
||
## Target maintainers | ||
|
||
- Jeremy Soller ([@jackpot51](https://github.com/jackpot51)) | ||
|
||
## Requirements | ||
|
||
These targets are natively compiled and can be cross-compiled. Std is fully supported. | ||
|
||
The targets are only expected to work with the latest version of Redox OS as the ABI is not yet stable. | ||
|
||
`extern "C"` uses the official calling convention of the respective architectures. | ||
|
||
Redox OS binaries use ELF as file format. | ||
|
||
## Building the target | ||
|
||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`. In addition a copy of [relibc] needs to be present in the linker search path. | ||
|
||
```toml | ||
[build] | ||
build-stage = 1 | ||
target = [ | ||
"<HOST_TARGET>", | ||
"x86_64-unknown-redox", | ||
"aarch64-unknown-redox", | ||
"i686-unknown-redox", | ||
] | ||
``` | ||
|
||
[relibc]: https://gitlab.redox-os.org/redox-os/relibc | ||
|
||
## Building Rust programs and testing | ||
|
||
Rust does not yet ship pre-compiled artifacts for Redox OS except for x86_64-unknown-redox. | ||
|
||
The easiest way to build and test programs for Redox OS is using [redoxer](https://gitlab.redox-os.org/redox-os/redoxer) which sets up the required compiler toolchain for building as well as runs programs inside a Redox OS VM using QEMU. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
The target supports C code. Pre-compiled C toolchains can be found at <https://static.redox-os.org/toolchain/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ path = "main.rs" | |
|
||
[dependencies] | ||
regex = "1" | ||
html5ever = "0.26.0" | ||
html5ever = "0.27.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.