Skip to content

Commit

Permalink
Flip arch default.
Browse files Browse the repository at this point in the history
The Arm version requires a dependency that is only available when the target is thumbv8m.main-none-eabihf. The RISC-V version compiles on any target.

With this change, you can compile the PAC for, say, aarch64-apple-darwin, without errors. It won't work, obviously, but it'll compile.
  • Loading branch information
thejpster committed Aug 17, 2024
1 parent be1e595 commit c7dbcca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build]
# Set a default target so the docs build
target = "thumbv8m.main-none-eabihf"
target = "riscv32imac-unknown-none-elf"
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

// Use the Cortex-M version by default

#[cfg(not(target_arch = "riscv32"))]
#[cfg(target_arch = "arm")]
#[doc(hidden)]
#[path = "inner/mod_cortex_m.rs"]
mod inner;

// On riscv32*-*-* use the RISC-V version

#[cfg(target_arch = "riscv32")]
#[cfg(not(target_arch = "arm"))]
#[doc(hidden)]
#[path = "inner/mod_risc_v.rs"]
mod inner;
Expand Down

0 comments on commit c7dbcca

Please sign in to comment.