rust-lang / rustc_codegen_cranelift

Cranelift based backend for rustc
Apache License 2.0
1.53k stars 95 forks source link

[PSA] Public Service Announcements Thread #1299

Open bjorn3 opened 1 year ago

bjorn3 commented 1 year ago

This issue will be used to communicate changes to the way cg_clif is built or used as well as to notify about the implementation of major features.

bjorn3 commented 1 year ago

I will lock this issue to prevent noise.

bjorn3 commented 1 year ago

In about 24h from now I will be merging https://github.com/bjorn3/rustc_codegen_cranelift/pull/1300, which renames the build/ directory to dist/. This means you will have to use dist/cargo-clif instead of build/cargo-clif.

bjorn3 commented 1 year ago

https://github.com/bjorn3/rustc_codegen_cranelift/pull/1347 will drop the precompiled CI artifacts for cross compiling from x86_64 Linux to AArch64 and S390x Linux to reduce the negative effects on CI time this PR has. Cross compile artifacts for x86_64 Linux to x86_64 MinGW Windows will remain and so will all non-cross-compilation artifacts. If you want to cross-compile for one of the dropped targets you will need to build cg_clif yourself.

bjorn3 commented 1 year ago

As of https://github.com/bjorn3/rustc_codegen_cranelift/pull/1365 the latest CI artifacts will now be published as release at https://github.com/bjorn3/rustc_codegen_cranelift/releases/tag/dev.

bjorn3 commented 9 months ago

I just noticed a huge runtime perf improvement for the simple-raytracer benchmark caused by the update from nightly-2023-10-09 to nightly-2023-10-19. (links are to the benchmark results) Compilation time improved for both the LLVM and Cranelift backend, but relatively speaking the improvement was bigger for the Cranelift backend. I am fairly certain this improvement comes from https://github.com/rust-lang/rust/pull/116505, which enables the MIR inliner to inline small functions cross-crate even if they lack #[inline].

bjorn3 commented 2 months ago

macOS builds were silently broken for about two weeks as github switched the architecture of the macOS CI runners from x86_64 to arm64, causing us to build arm64 binaries. These binaries were broken as arm64 macOS is currently not supported: https://github.com/rust-lang/rustc_codegen_cranelift/issues/1248 I've pushed a fix to force building x86_64 binaries again.

bjorn3 commented 4 weeks ago

As of #1500 arm64 macOS (Apple Silicon) is now supported and pre-compiled builds are now available at https://github.com/bjorn3/rustc_codegen_cranelift/releases/tag/dev.

Edit: If you use XCode 15, make sure to use RUSTFLAGS="-Clink-arg=-ld_classic" as the new linker doesn't like our object files. Edit2: Now works fine with XCode 15 as of https://github.com/rust-lang/rustc_codegen_cranelift/commit/3d54358b643fc258b19688f6c6f8cc3d8831855c.