From 117c15b4654b38587452cc89673871bc1c34a3cc Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Wed, 10 Jan 2024 06:17:02 -0800 Subject: [PATCH] Use the `--comments` preprocessor flag Preserving comments is useful in certain edge cases where the Win32 RC preprocessor behaves differently than other preprocessors. Now that https://github.com/Vexu/arocc/issues/611 has been fixed, we can use this flag. --- src/preprocess.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/preprocess.zig b/src/preprocess.zig index 4a3b4ea..e93b34c 100644 --- a/src/preprocess.zig +++ b/src/preprocess.zig @@ -79,6 +79,7 @@ fn hasAnyErrors(comp: *aro.Compilation) bool { pub fn appendAroArgs(arena: Allocator, argv: *std.ArrayList([]const u8), options: cli.Options, system_include_paths: []const []const u8) !void { try argv.appendSlice(&.{ "-E", + "--comments", "-fuse-line-directives", "--target=x86_64-windows-msvc", "--emulate=msvc",