Skip to content

Commit

Permalink
Merge #767
Browse files Browse the repository at this point in the history
767: Add cross-dev and cross-util commands. r=Emilgardis a=Alexhuszagh

The cross-dev command has the `target-info` subcommand, which target information (libc, compiler, C++, qemu version) for a given target.

```bash
cross-dev target-info
cross-dev target-info arm-unknown-linux-gnueabihf
```

The cross-util command has the `list-images` and `remove-images` subcommands. `list-images` lists all cross images, including local development files. `remove-images` removes cross images.

```bash
cross-util list-images
cross-util remove-images
cross-util remove-images arm-unknown-linux-gnueabihf
```

Closes #760.

Co-authored-by: Alex Huszagh <[email protected]>
  • Loading branch information
bors[bot] and Alexhuszagh authored Jun 8, 2022
2 parents 94adafe + 71fa2f0 commit 23d3f5f
Show file tree
Hide file tree
Showing 12 changed files with 641 additions and 95 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ jobs:
- { target: i686-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 }
- { target: mips-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: mipsel-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: aarch64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, cpp: 1, runners: qemu-user }
- { target: arm-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1, cpp: 1, runners: qemu-user }
- { target: armv7-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1, cpp: 1, runners: qemu-user }
- { target: i686-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, cpp: 1, runners: qemu-user }
- { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, cpp: 1, runners: qemu-user }
- { target: aarch64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: arm-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: armv7-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: i686-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: x86_64-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: i686-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
# Disabled for now, see https://github.com/rust-lang/rust/issues/85821
Expand Down Expand Up @@ -249,6 +249,9 @@ jobs:
if: matrix.deploy
run: cargo install --path . --force

- name: Build cross-dev
run: cargo build --features=dev --bin cross-dev

- uses: ./.github/actions/cargo-install-upload-artifacts
if: matrix.deploy
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Added

- #767 - added the `cross-util` and `cross-dev` commands.
- #741 - added `armv7-unknown-linux-gnueabi` and `armv7-unknown-linux-musleabi` targets.
- #721 - add support for running doctests on nightly if `CROSS_UNSTABLE_ENABLE_DOCTESTS=true`.
- #719 - add `--list` to known subcommands.
Expand Down
153 changes: 153 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ repository = "https://github.com/cross-rs/cross"
version = "0.2.1"
edition = "2021"

[features]
default = []
dev = ["serde_yaml"]

[dependencies]
atty = "0.2"
clap = { version = "3.1.18", features = ["derive"] }
color-eyre = "0.6"
eyre = "0.6"
home = "0.5"
Expand All @@ -20,6 +25,7 @@ which = { version = "4", default_features = false }
shell-escape = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = { version = "0.8", optional = true }
serde_ignored = "0.1.2"

[target.'cfg(not(windows))'.dependencies]
Expand All @@ -37,3 +43,8 @@ lto = true
regex = "1"
once_cell = "1"
walkdir = "2"

[[bin]]
name = "cross-dev"
path = "cross-dev/main.rs"
required-features = ["dev"]
80 changes: 0 additions & 80 deletions ci/extract_target_info.sh

This file was deleted.

Loading

0 comments on commit 23d3f5f

Please sign in to comment.