Skip to content

Commit

Permalink
Improve style
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Apr 22, 2024
1 parent f34cfa6 commit b2c08c6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions crates/sel4-kernel-loader/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use object::{
use quote::format_ident;

use sel4_build_env::{get_libsel4_include_dirs, get_with_sel4_prefix_relative_fallback};
use sel4_config::{sel4_cfg_if, sel4_cfg_str, sel4_cfg_usize};
use sel4_config::{sel4_cfg, sel4_cfg_if, sel4_cfg_str, sel4_cfg_usize};
use sel4_kernel_loader_embed_page_tables::{
schemes, LeafLocation, Region, RegionsBuilder, Scheme, SchemeHelpers,
};
Expand All @@ -29,13 +29,11 @@ use sel4_rustfmt_helper::Rustfmt;

pub const SEL4_KERNEL_ENV: &str = "SEL4_KERNEL";

sel4_cfg_if! {
if #[sel4_cfg(WORD_SIZE = "64")] {
type FileHeader = object::elf::FileHeader64<Endianness>;
} else if #[sel4_cfg(WORD_SIZE = "32")] {
type FileHeader = object::elf::FileHeader32<Endianness>;
}
}
#[sel4_cfg(WORD_SIZE = "64")]
type FileHeader = object::elf::FileHeader64<Endianness>;

#[sel4_cfg(WORD_SIZE = "32")]
type FileHeader = object::elf::FileHeader32<Endianness>;

sel4_cfg_if! {
if #[sel4_cfg(SEL4_ARCH = "aarch64")] {
Expand Down

0 comments on commit b2c08c6

Please sign in to comment.