| ... | ... | @@ -4759,11 +4759,17 @@ fn updateWin32Resource(comp: *Compilation, win32_resource: *Win32Resource, win32 |
| 4759 | 4759 | // unconditionally set `ignore_include_env_var` to true |
| 4760 | 4760 | options.ignore_include_env_var = true; |
| 4761 | 4761 | |
| 4762 | if (options.preprocess != .yes) { |
| 4763 | return comp.failWin32Resource(win32_resource, "the '{s}' option is not supported in this context", .{switch (options.preprocess) { |
| 4764 | .no => "/:no-preprocess", |
| 4765 | .only => "/p", |
| 4766 | .yes => unreachable, |
| 4767 | }}); |
| 4768 | } |
| 4769 | |
| 4762 | 4770 | var argv = std.ArrayList([]const u8).init(comp.gpa); |
| 4763 | 4771 | defer argv.deinit(); |
| 4764 | 4772 | |
| 4765 | | // TODO: support options.preprocess == .no and .only |
| 4766 | | // alternatively, error if those options are used |
| 4767 | 4773 | try argv.appendSlice(&[_][]const u8{ self_exe_path, "clang" }); |
| 4768 | 4774 | |
| 4769 | 4775 | try resinator.preprocess.appendClangArgs(arena, &argv, options, .{ |