diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.yml index 6afc01d6..11c05760 100644 --- a/.github/actions/install-rust/action.yml +++ b/.github/actions/install-rust/action.yml @@ -8,5 +8,5 @@ inputs: default: 'stable' runs: - using: node16 + using: node20 main: 'main.js' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06db6845..d72d7212 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,12 +30,12 @@ jobs: include: - build: ubuntu os: ubuntu-latest - rust: nightly-2024-08-19 + rust: nightly-2024-10-01 host_target: x86_64-unknown-linux-gnu mustang_target: x86_64-mustang-linux-gnu - build: i686-linux os: ubuntu-latest - rust: nightly-2024-08-19 + rust: nightly-2024-10-01 target: i686-unknown-linux-gnu gcc_package: gcc-i686-linux-gnu gcc: i686-linux-gnu-gcc @@ -44,7 +44,7 @@ jobs: mustang_target: i686-mustang-linux-gnu - build: aarch64-linux os: ubuntu-latest - rust: nightly-2024-08-19 + rust: nightly-2024-10-01 target: aarch64-unknown-linux-gnu gcc_package: gcc-aarch64-linux-gnu gcc: aarch64-linux-gnu-gcc @@ -54,7 +54,7 @@ jobs: mustang_target: aarch64-mustang-linux-gnu - build: riscv64-linux os: ubuntu-latest - rust: nightly-2024-08-19 + rust: nightly-2024-10-01 target: riscv64gc-unknown-linux-gnu gcc_package: gcc-riscv64-linux-gnu gcc: riscv64-linux-gnu-gcc @@ -138,22 +138,22 @@ jobs: - name: Install rust-src run: | - rustup component add rust-src --toolchain nightly-2024-08-19-x86_64-unknown-linux-gnu + rustup component add rust-src --toolchain nightly-2024-10-01-x86_64-unknown-linux-gnu - name: cargo check non-mustang run: | # Check that the code compiles on non-mustang targets. - cargo +nightly-2024-08-19 check --all --target=${{ matrix.host_target }} + cargo +nightly-2024-10-01 check --all --target=${{ matrix.host_target }} - name: cargo test run: | - cargo +nightly-2024-08-19 test --verbose -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} -- --nocapture + cargo +nightly-2024-10-01 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-08-19 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} + cargo +nightly-2024-10-01 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} env: RUST_BACKTRACE: 1 @@ -181,20 +181,20 @@ jobs: - name: test mustang-nostd as program working-directory: example-crates/mustang-nostd run: | - cargo +nightly-2024-08-19 run -Zbuild-std=core,alloc --target=../../target-specs/${{ matrix.mustang_target }}.json + cargo +nightly-2024-10-01 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-08-19 test -Zbuild-std=core,alloc,test,std --target=../../target-specs/${{ matrix.mustang_target }}.json + cargo +nightly-2024-10-01 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-08-19 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json + cargo +nightly-2024-10-01 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json env: RUST_BACKTRACE: 1 diff --git a/Cargo.toml b/Cargo.toml index 23270231..9e3a482f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ exclude = ["/.github", "ci"] keywords = ["linux"] [target.'cfg(target_vendor = "mustang")'.dependencies] -c-gull = { version = "0.17.0", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates", "define-mem-functions"] } +c-gull = { version = "0.18.1", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates", "define-mem-functions"] } [dev-dependencies] similar-asserts = "1.1.0" @@ -29,7 +29,9 @@ ctor = "0.2.0" which = "6.0.0" # Test that the core_simd crate works under mustang. -core_simd = { git = "https://github.com/rust-lang/portable-simd" } +# TODO: Reenable this when the crate compiles on nightly. Currently it gets: +# - error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: simd_shuffle index must be a SIMD vector of `u32`, got `[u32; 4]` +#core_simd = { git = "https://github.com/rust-lang/portable-simd" } [features] default = ["thread", "std"] @@ -43,9 +45,3 @@ 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"] - -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false diff --git a/README.md b/README.md index 689a59df..58aaf623 100644 --- a/README.md +++ b/README.md @@ -77,15 +77,6 @@ builds arranges for `mustang`'s libraries to be linked in. mustang::can_run_this!(); ``` -And, to work around an LLVM bug, add the following to Cargo.toml: -```toml -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false -``` - Then, compile with Rust nightly, using `-Z build-std` and `--target=`. For example: diff --git a/example-crates/mustang-custom-allocator/Cargo.toml b/example-crates/mustang-custom-allocator/Cargo.toml index 43b39102..a0a866ef 100644 --- a/example-crates/mustang-custom-allocator/Cargo.toml +++ b/example-crates/mustang-custom-allocator/Cargo.toml @@ -12,9 +12,3 @@ mustang = { path = "../.." } rustix-dlmalloc = { version = "0.1.0", features = ["global"] } [workspace] - -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false diff --git a/example-crates/mustang-example-lto/Cargo.toml b/example-crates/mustang-example-lto/Cargo.toml index 211fae08..dcabe5bc 100644 --- a/example-crates/mustang-example-lto/Cargo.toml +++ b/example-crates/mustang-example-lto/Cargo.toml @@ -14,9 +14,3 @@ lto = true # This is just an example crate, and not part of the mustang workspace. [workspace] - -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false diff --git a/example-crates/mustang-example/Cargo.toml b/example-crates/mustang-example/Cargo.toml index da3640e5..e2086539 100644 --- a/example-crates/mustang-example/Cargo.toml +++ b/example-crates/mustang-example/Cargo.toml @@ -10,9 +10,3 @@ mustang = { path = "../.." } # This is just an example crate, and not part of the mustang workspace. [workspace] - -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false diff --git a/example-crates/mustang-nostd/Cargo.toml b/example-crates/mustang-nostd/Cargo.toml index c1a06aef..98a79fe6 100644 --- a/example-crates/mustang-nostd/Cargo.toml +++ b/example-crates/mustang-nostd/Cargo.toml @@ -12,9 +12,3 @@ mustang = { path = "../..", default-features = false, features = ["thread"] } rustix-dlmalloc = { version = "0.1.0", features = ["global"] } [workspace] - -# TODO: Remove this workaround when -# https://github.com/llvm/llvm-project/pull/105513 -# makes it into the Rust compiler. -[profile.dev.package.unwinding] -debug = false diff --git a/examples/test-simd.rs b/examples/test-simd.rs index c77167e2..70f2f0a1 100644 --- a/examples/test-simd.rs +++ b/examples/test-simd.rs @@ -2,12 +2,15 @@ mustang::can_run_this!(); -use core::arch::asm; +//use core::arch::asm; fn main() { + // TODO: Reenable this when the crate compiles on nightly. + /* use core_simd::simd::*; let mut a = f32x4::splat(2.0); unsafe { asm!("# {}", in(reg) &mut a) }; assert_eq!(a, f32x4::splat(2.0)); assert_eq!(&a as *const _ as usize & 0xf, 0); + */ } diff --git a/tests/examples.rs b/tests/examples.rs index 54ac8df9..68907c33 100644 --- a/tests/examples.rs +++ b/tests/examples.rs @@ -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-08-19"); + command.arg("+nightly-2024-10-01"); } command.arg("run").arg("--quiet"); if !features.is_empty() {