File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 11use std:: ffi:: OsString ;
22use std:: path:: { Path , PathBuf } ;
33
4- use crate :: execute_command;
4+ use crate :: { execute_command, test_nasm_command } ;
55
66#[ derive( Debug ) ]
77pub ( 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) ;
You can’t perform that action at this time.
0 commit comments