Skip to content

Commit 588c630

Browse files
committed
Escape { and } before passing to global_asm!()
1 parent a0c1a29 commit 588c630

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/global_asm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ pub(crate) fn compile_global_asm(
202202
return Err(format!("Failed to assemble `{}`", global_asm));
203203
}
204204
} else {
205+
// Escape { and }
206+
let global_asm = global_asm.replace('{', "{{").replace('}', "}}");
207+
205208
let mut child = Command::new(std::env::current_exe().unwrap())
206209
// Avoid a warning about the jobserver fd not being passed
207210
.env_remove("CARGO_MAKEFLAGS")

0 commit comments

Comments
 (0)