Skip to content

Commit

Permalink
Ask nasm to emit debug info in debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
thedataking committed Mar 18, 2024
1 parent f5bee55 commit d399d3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ mod asm {
let mut nasm = nasm_rs::Build::new();
nasm.min_version(2, 14, 0);
nasm.files(asm_file_paths);
#[cfg(debug_assertions)]
nasm.flag("-g");
#[cfg(debug_assertions)]
nasm.flag("-Fdwarf");
nasm.flag(&format!("-I{}/", out_dir.to_str().unwrap()));
nasm.flag("-Isrc/");
let obj = nasm.compile_objects().unwrap_or_else(|e| {
Expand Down

0 comments on commit d399d3e

Please sign in to comment.