Skip to content

Commit

Permalink
build: Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Nov 10, 2023
1 parent fb4d60c commit bf6479b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,13 @@ fn get_page_size() {

fn main() {
let rustc_toolchain = env::var("RUSTUP_TOOLCHAIN").unwrap_or_else(|_| "stable".to_string());
let has_asm = if rustc_toolchain.starts_with("nightly") {
true
} else if cfg!(any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "x86_64",
target_arch = "x86"
)) {
true
} else {
false
};
let has_asm = rustc_toolchain.starts_with("nightly")
|| cfg!(any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "x86_64",
target_arch = "x86"
));
if has_asm {
println!("cargo:rustc-cfg=has_asm");
} else {
Expand Down

0 comments on commit bf6479b

Please sign in to comment.