diff --git a/bofs/build.zig b/bofs/build.zig index 3e1822f..2673fde 100644 --- a/bofs/build.zig +++ b/bofs/build.zig @@ -166,7 +166,10 @@ pub fn build( }); obj.addCSourceFile(.{ .file = .{ .cwd_relative = source_file_path }, - .flags = &.{ "-DBOF", "-D_GNU_SOURCE" }, + .flags = &.{ "-DBOF", "-D_GNU_SOURCE", + if (arch == .x86 or arch == .x64) "-include" ++ thisDir() ++ "/src/force_intel_asm.h" else "", + if (arch == .x86) "-DWOW64" else "" + }, }); if (format == .coff) { obj.addIncludePath(.{ .cwd_relative = windows_include_dir }); diff --git a/bofs/src/force_intel_asm.h b/bofs/src/force_intel_asm.h new file mode 100644 index 0000000..0782eeb --- /dev/null +++ b/bofs/src/force_intel_asm.h @@ -0,0 +1,2 @@ +#pragma once +__asm__(".intel_syntax");