Skip to content

Commit

Permalink
Avoid nightly regression by using older nightly (#338)
Browse files Browse the repository at this point in the history
nightly-2023-12-15 breaks compilation of native applets by having
symbols from `compiler_builtins` conflict between the applet static
library and the platform during linking. This was not the case with
nightly-2023-11-14.

This rollback is temporary until
rust-lang/rust#118609 is fixed or provides
guidance on how to address this issue. Currently the only work-arounds
are:

- Compile the applet to an object file (like `applet.o`) and let the
platform link all the dependencies of the applet. This is not obvious to
do generically at the moment.

- Require applets that need to compile natively to directly depend on
`compiler_builtins` with the `weak-intrinsics` feature. If the
dependency could been indirect, the prelude would have been the perfect
place to introduce it. But given the dependency must be direct, this
adds a small burden on applets.
  • Loading branch information
ia0 authored Dec 20, 2023
1 parent f6711f2 commit 1307dd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/prelude/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 19 -->
<!-- Increment to skip CHANGELOG.md test: 20 -->
2 changes: 1 addition & 1 deletion crates/prelude/src/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ macro_rules! define {
(#[$m:meta] $n:ident $(, $x:ident)*) => {
#[$m] #[no_mangle]
extern "C" fn $n (
ptr: extern "C" fn(*const u8 $(, usize ${ignore($x)})*),
ptr: extern "C" fn(*const u8 $(, usize ${ignore(x)})*),
this: *const u8 $(, $x: usize)*
) {
ptr(this $(, $x)*);
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2023-12-15"
channel = "nightly-2023-11-14"
components = ["clippy", "llvm-tools", "rust-src", "rustfmt"]
targets = [
"i686-unknown-linux-gnu",
Expand Down

0 comments on commit 1307dd7

Please sign in to comment.