Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ fn build_nasm_files() {
if let Some((hash, hash_path)) =
hash_changed(asm_files, &out_dir, &dest_path)
{
let obj = nasm_rs::Build::new()
let mut nasm_build = nasm_rs::Build::new();
if let Ok(nasm) = env::var("NASM") {
nasm_build.nasm(nasm);
}

let obj = nasm_build
.min_version(2, 15, 0)
.include(&out_dir)
.include("src")
Expand All @@ -143,6 +148,7 @@ fn build_nasm_files() {
.unwrap_or_else(|e| {
panic!("NASM build failed. Make sure you have nasm installed or disable the \"asm\" feature.\n\
You can get NASM from https://nasm.us or your system's package manager.\n\
Alternatively, you can configure the path to a NASM binary via the "NASM" env var.\n\
\n\
error: {e}");
});
Expand Down