Skip to content

Commit 0bf42f6

Browse files
committed
Add debug
1 parent 3d2ac24 commit 0bf42f6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

aws-lc-sys/builder/cc_builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,10 @@ impl CcBuilder {
489489
} else if is_jitter_entropy {
490490
jitter_entropy_builder.file(source_path);
491491
} else if source_path.extension() == Some("asm".as_ref()) {
492+
emit_warning(&format!("NASM file: {:?}", source_path.as_os_str()));
492493
nasm_builder.file(source_path);
493494
} else {
495+
emit_warning(&format!("CC file: {:?}", source_path.as_os_str()));
494496
cc_build.file(source_path);
495497
}
496498
}

aws-lc-sys/builder/nasm_builder.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::ffi::OsString;
22
use std::path::{Path, PathBuf};
33

4-
use crate::execute_command;
4+
use crate::{execute_command, test_nasm_command};
55

66
#[derive(Debug)]
77
pub(crate) struct NasmBuilder {
@@ -45,6 +45,10 @@ impl NasmBuilder {
4545
}
4646

4747
pub(crate) fn compile_intermediates(&self) -> Vec<PathBuf> {
48+
if !test_nasm_command() {
49+
panic!("NASM command not found! Build cannot continue.");
50+
}
51+
4852
let mut objects = Vec::new();
4953

5054
for src in &self.files {
@@ -87,7 +91,12 @@ impl NasmBuilder {
8791
&args.iter().map(|s| s.as_os_str()).collect::<Vec<_>>(),
8892
);
8993
if !result.status {
90-
panic!("NASM failed for {}: {}", src.display(), result.stderr);
94+
panic!(
95+
"NASM failed for {}:\n-----\n{}\n-----\n{}\n-----\n",
96+
src.display(),
97+
result.stdout,
98+
result.stderr
99+
);
91100
}
92101

93102
objects.push(obj_path);

0 commit comments

Comments
 (0)