Skip to content

Commit

Permalink
Make failure when compiling objc2 on non-Apple platform clearer
Browse files Browse the repository at this point in the history
Should have helped with the confusion in:
#663 (comment)
  • Loading branch information
madsmtm committed Jan 29, 2025
1 parent 2794ebf commit 31a7505
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/block2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ extern crate std;
feature = "unstable-objfw",
))
))]
compile_error!("A runtime must be selected");
compile_error!("`block2` only works on Apple platforms. Pass `--target aarch64-apple-darwin` or similar to compile for macOS.\n(If you're absolutely certain that you want to use `block2` on Linux/Windows, you can specify that with the `gnustep-x-y`/`compiler-rt` Cargo features instead).");

#[cfg(any(
all(feature = "compiler-rt", feature = "gnustep-1-7"),
Expand Down
2 changes: 1 addition & 1 deletion crates/objc2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ compile_error!("The `std` feature currently must be enabled.");
feature = "unstable-objfw",
))
))]
compile_error!("A runtime must be selected");
compile_error!("`objc2` only works on Apple platforms. Pass `--target aarch64-apple-darwin` or similar to compile for macOS.\n(If you're absolutely certain that you're using GNUStep, you can specify that with the `gnustep-x-y` Cargo feature instead).");

#[cfg(all(feature = "gnustep-1-7", feature = "unstable-objfw"))]
compile_error!("Only one runtime may be selected");
Expand Down

0 comments on commit 31a7505

Please sign in to comment.