fix msvc asm not support in cross mode

This commit is contained in:
kbkpbot 2025-08-24 09:53:11 +08:00
parent 2a7735f7d4
commit f82b6f01b1

View file

@ -2667,7 +2667,7 @@ fn (mut g Gen) stmt(node ast.Stmt) {
g.writeln('goto ${c_name(node.name)};')
}
ast.AsmStmt {
if g.is_cc_msvc {
if g.is_cc_msvc && !g.pref.output_cross_c {
g.error('msvc does not support inline assembly', node.pos)
}
g.write_v_source_line_info_stmt(node)