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

Update to origin 0.21. #246

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
include:
- build: ubuntu
os: ubuntu-latest
rust: nightly-2024-10-01
rust: nightly-2024-10-06
host_target: x86_64-unknown-linux-gnu
mustang_target: x86_64-mustang-linux-gnu
- build: i686-linux
os: ubuntu-latest
rust: nightly-2024-10-01
rust: nightly-2024-10-06
target: i686-unknown-linux-gnu
gcc_package: gcc-i686-linux-gnu
gcc: i686-linux-gnu-gcc
Expand All @@ -44,7 +44,7 @@ jobs:
mustang_target: i686-mustang-linux-gnu
- build: aarch64-linux
os: ubuntu-latest
rust: nightly-2024-10-01
rust: nightly-2024-10-06
target: aarch64-unknown-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
Expand All @@ -54,7 +54,7 @@ jobs:
mustang_target: aarch64-mustang-linux-gnu
- build: riscv64-linux
os: ubuntu-latest
rust: nightly-2024-10-01
rust: nightly-2024-10-06
target: riscv64gc-unknown-linux-gnu
gcc_package: gcc-riscv64-linux-gnu
gcc: riscv64-linux-gnu-gcc
Expand Down Expand Up @@ -138,22 +138,22 @@ jobs:

- name: Install rust-src
run: |
rustup component add rust-src --toolchain nightly-2024-10-01-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2024-10-06-x86_64-unknown-linux-gnu

- name: cargo check non-mustang
run: |
# Check that the code compiles on non-mustang targets.
cargo +nightly-2024-10-01 check --all --target=${{ matrix.host_target }}
cargo +nightly-2024-10-06 check --all --target=${{ matrix.host_target }}

- name: cargo test
run: |
cargo +nightly-2024-10-01 test --verbose -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} -- --nocapture
cargo +nightly-2024-10-06 test --verbose -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} -- --nocapture
env:
RUST_BACKTRACE: 1

- name: cargo test --release
run: |
cargo +nightly-2024-10-01 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }}
cargo +nightly-2024-10-06 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }}
env:
RUST_BACKTRACE: 1

Expand Down Expand Up @@ -181,20 +181,20 @@ jobs:
- name: test mustang-nostd as program
working-directory: example-crates/mustang-nostd
run: |
cargo +nightly-2024-10-01 run -Zbuild-std=core,alloc --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2024-10-06 run -Zbuild-std=core,alloc --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1

- name: test mustang-nostd as tests
working-directory: example-crates/mustang-nostd
run: |
cargo +nightly-2024-10-01 test -Zbuild-std=core,alloc,test,std --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2024-10-06 test -Zbuild-std=core,alloc,test,std --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1

- name: test mustang-custom-allocator as tests
working-directory: example-crates/mustang-custom-allocator
run: |
cargo +nightly-2024-10-01 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2024-10-06 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1
41 changes: 40 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = ["/.github", "ci"]
keywords = ["linux"]

[target.'cfg(target_vendor = "mustang")'.dependencies]
c-gull = { version = "0.18.1", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates", "define-mem-functions"] }
c-gull = { version = "0.19.1", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates"] }

[dev-dependencies]
similar-asserts = "1.1.0"
Expand Down Expand Up @@ -45,3 +45,42 @@ std = ["c-gull/std"]
# Enable highly experimental support for performing startup-time relocations,
# needed to support statically-linked PIE executables.
experimental-relocate = ["c-gull/experimental-relocate"]

# Provide a `#[lang = eh_personality]` function suitable for unwinding (for
# no-std).
#
# If you know your program never unwinds and want smaller code size, use
# "eh-personality-continue" instead.
#
# This is only needed in no-std builds, as std provides a personality. See
# [the "personality" feature of the unwinding crate] for more details.
#
# [the "personality" feature of the unwinding crate]: https://crates.io/crates/unwinding#personality-and-other-utilities
eh-personality = ["c-gull/eh-personality"]

# Provide a `#[lang = eh_personality]` function that just returns
# `CONTINUE_UNWIND` (for no-std). Use this if you know your program will never
# unwind and don't want any extra code.
eh-personality-continue = ["c-gull/eh-personality-continue"]

# Provide a `#[panic_handler]` function suitable for unwinding (for no-std).
#
# If you know your program never panics and want smaller code size, use
# "panic-handler-abort" instead.
#
# This is only needed in no-std builds, as std provides a panic handler. See
# [the "panic-handler" feature of the unwinding crate] for more details.
#
# [the "panic-handler" feature of the unwinding crate]: https://crates.io/crates/unwinding#personality-and-other-utilities
panic-handler = ["c-gull/panic-handler"]

# Provide a `#[panic_handler]` function that just aborts (for no-std). Use this
# if you know your program will never panic and don't want any extra code.
panic-handler-abort = ["c-gull/panic-handler-abort"]

# Provide a `#[global_allocator]` function (for no-std).
#
# This is only needed in no-std builds, as std provides a global allocator.
# Alternatively, you can define the global allocator manually; see the
# example-crates/custom-allocator example.
global-allocator = ["c-gull/global-allocator"]
2 changes: 1 addition & 1 deletion tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn test_example(name: &str, features: &str, stdout: &str, stderr: &str) {

let mut command = Command::new("cargo");
if which::which("rustup").is_ok() {
command.arg("+nightly-2024-10-01");
command.arg("+nightly-2024-10-06");
}
command.arg("run").arg("--quiet");
if !features.is_empty() {
Expand Down