| ... | ... | @@ -6692,7 +6692,7 @@ pub fn addTranslateCCArgs( |
| 6692 | 6692 | const resource_path = try comp.dirs.zig_lib.join(arena, &.{"compiler/aro/include"}); |
| 6693 | 6693 | try argv.appendSlice(&.{ "-isystem", resource_path }); |
| 6694 | 6694 | |
| 6695 | | try comp.addCommonCCArgs(arena, argv, ext, out_dep_path, owner_mod); |
| 6695 | try comp.addCommonCCArgs(arena, argv, ext, out_dep_path, owner_mod, .aro); |
| 6696 | 6696 | |
| 6697 | 6697 | try argv.appendSlice(&[_][]const u8{ "-target", try target.zigTriple(arena) }); |
| 6698 | 6698 | |
| ... | ... | @@ -6728,6 +6728,7 @@ fn addCommonCCArgs( |
| 6728 | 6728 | ext: FileExt, |
| 6729 | 6729 | out_dep_path: ?[]const u8, |
| 6730 | 6730 | mod: *Package.Module, |
| 6731 | c_frontend: Config.CFrontend, |
| 6731 | 6732 | ) !void { |
| 6732 | 6733 | const target = &mod.resolved_target.result; |
| 6733 | 6734 | |
| ... | ... | @@ -6911,6 +6912,8 @@ fn addCommonCCArgs( |
| 6911 | 6912 | } |
| 6912 | 6913 | } |
| 6913 | 6914 | |
| 6915 | const is_clang = c_frontend == .clang; |
| 6916 | |
| 6914 | 6917 | // Only C-family files support these flags. |
| 6915 | 6918 | switch (ext) { |
| 6916 | 6919 | .c, |
| ... | ... | @@ -6922,7 +6925,7 @@ fn addCommonCCArgs( |
| 6922 | 6925 | .mm, |
| 6923 | 6926 | .hmm, |
| 6924 | 6927 | => { |
| 6925 | | try argv.append("-fno-spell-checking"); |
| 6928 | if (is_clang) try argv.append("-fno-spell-checking"); |
| 6926 | 6929 | |
| 6927 | 6930 | if (target.os.tag == .windows and target.abi.isGnu()) { |
| 6928 | 6931 | // windows.h has files such as pshpack1.h which do #pragma packing, |
| ... | ... | @@ -6954,7 +6957,7 @@ fn addCommonCCArgs( |
| 6954 | 6957 | try argv.append(try std.fmt.allocPrint(arena, "-mcmodel={s}", .{@tagName(mod.code_model)})); |
| 6955 | 6958 | } |
| 6956 | 6959 | |
| 6957 | | { |
| 6960 | if (is_clang) { |
| 6958 | 6961 | var san_arg: std.ArrayListUnmanaged(u8) = .empty; |
| 6959 | 6962 | const prefix = "-fsanitize="; |
| 6960 | 6963 | if (mod.sanitize_c != .off) { |
| ... | ... | @@ -7102,7 +7105,7 @@ pub fn addCCArgs( |
| 7102 | 7105 | }); |
| 7103 | 7106 | } |
| 7104 | 7107 | |
| 7105 | | try comp.addCommonCCArgs(arena, argv, ext, out_dep_path, mod); |
| 7108 | try comp.addCommonCCArgs(arena, argv, ext, out_dep_path, mod, comp.config.c_frontend); |
| 7106 | 7109 | |
| 7107 | 7110 | // Only assembly files support these flags. |
| 7108 | 7111 | switch (ext) { |