Skip to content

Commit

Permalink
The feature dummy-atomic is only effective under risc-v (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
joii2020 authored Sep 25, 2024
1 parent 1317840 commit b8f1f46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ fn main() {
setup_compiler_flags(&mut build);
build.compile("libc");
}
if target_arch != "riscv64" && cfg!(feature = "dummy-atomic") {
println!("cargo:warning=This build script intentionally failed: feature `dummy-atomic` can't be used in non risc-v target");
std::process::exit(1);
}
}

fn setup_compiler_flags(build: &mut cc::Build) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub mod dynamic_loading;
pub mod dynamic_loading_c_impl;
#[cfg(feature = "allocator")]
pub use buddy_alloc;
#[cfg(feature = "dummy-atomic")]
#[cfg(all(target_arch = "riscv64", feature = "dummy-atomic"))]
pub mod dummy_atomic;
#[cfg(feature = "log")]
pub mod logger;
Expand Down

0 comments on commit b8f1f46

Please sign in to comment.