| ... | ... | @@ -1156,12 +1156,16 @@ fn buildOutputType( |
| 1156 | 1156 | try clang_argv.append(args_iter.nextOrFatal()); |
| 1157 | 1157 | } else if (mem.eql(u8, arg, "-I")) { |
| 1158 | 1158 | try cssan.addIncludePath(.I, arg, args_iter.nextOrFatal(), false); |
| 1159 | | } else if (mem.eql(u8, arg, "-isystem") or mem.eql(u8, arg, "-iwithsysroot")) { |
| 1159 | } else if (mem.eql(u8, arg, "-isystem")) { |
| 1160 | 1160 | try cssan.addIncludePath(.isystem, arg, args_iter.nextOrFatal(), false); |
| 1161 | } else if (mem.eql(u8, arg, "-iwithsysroot")) { |
| 1162 | try cssan.addIncludePath(.iwithsysroot, arg, args_iter.nextOrFatal(), false); |
| 1161 | 1163 | } else if (mem.eql(u8, arg, "-idirafter")) { |
| 1162 | 1164 | try cssan.addIncludePath(.idirafter, arg, args_iter.nextOrFatal(), false); |
| 1163 | | } else if (mem.eql(u8, arg, "-iframework") or mem.eql(u8, arg, "-iframeworkwithsysroot")) { |
| 1165 | } else if (mem.eql(u8, arg, "-iframework")) { |
| 1164 | 1166 | try cssan.addIncludePath(.iframework, arg, args_iter.nextOrFatal(), false); |
| 1167 | } else if (mem.eql(u8, arg, "-iframeworkwithsysroot")) { |
| 1168 | try cssan.addIncludePath(.iframeworkwithsysroot, arg, args_iter.nextOrFatal(), false); |
| 1165 | 1169 | } else if (mem.eql(u8, arg, "--version")) { |
| 1166 | 1170 | const next_arg = args_iter.nextOrFatal(); |
| 1167 | 1171 | version = std.SemanticVersion.parse(next_arg) catch |err| { |
| ... | ... | @@ -6191,6 +6195,11 @@ const ClangSearchSanitizer = struct { |
| 6191 | 6195 | if (m.idirafter) std.log.warn(wtxt, .{ dir, "isystem", "idirafter" }); |
| 6192 | 6196 | if (m.iframework) std.log.warn(wtxt, .{ dir, "isystem", "iframework" }); |
| 6193 | 6197 | }, |
| 6198 | .iwithsysroot => { |
| 6199 | if (m.iwithsysroot) return; |
| 6200 | m.iwithsysroot = true; |
| 6201 | if (m.iframeworkwithsysroot) std.log.warn(wtxt, .{ dir, "iwithsysroot", "iframeworkwithsysroot" }); |
| 6202 | }, |
| 6194 | 6203 | .idirafter => { |
| 6195 | 6204 | if (m.idirafter) return; |
| 6196 | 6205 | m.idirafter = true; |
| ... | ... | @@ -6205,18 +6214,25 @@ const ClangSearchSanitizer = struct { |
| 6205 | 6214 | if (m.isystem) std.log.warn(wtxt, .{ dir, "iframework", "isystem" }); |
| 6206 | 6215 | if (m.idirafter) std.log.warn(wtxt, .{ dir, "iframework", "idirafter" }); |
| 6207 | 6216 | }, |
| 6217 | .iframeworkwithsysroot => { |
| 6218 | if (m.iframeworkwithsysroot) return; |
| 6219 | m.iframeworkwithsysroot = true; |
| 6220 | if (m.iwithsysroot) std.log.warn(wtxt, .{ dir, "iframeworkwithsysroot", "iwithsysroot" }); |
| 6221 | }, |
| 6208 | 6222 | } |
| 6209 | 6223 | try self.argv.append(arg); |
| 6210 | 6224 | if (!joined) try self.argv.append(dir); |
| 6211 | 6225 | } |
| 6212 | 6226 | |
| 6213 | | const Group = enum { I, isystem, idirafter, iframework }; |
| 6227 | const Group = enum { I, isystem, iwithsysroot, idirafter, iframework, iframeworkwithsysroot }; |
| 6214 | 6228 | |
| 6215 | 6229 | const Membership = packed struct { |
| 6216 | 6230 | I: bool = false, |
| 6217 | 6231 | isystem: bool = false, |
| 6232 | iwithsysroot: bool = false, |
| 6218 | 6233 | idirafter: bool = false, |
| 6219 | 6234 | iframework: bool = false, |
| 6235 | iframeworkwithsysroot: bool = false, |
| 6220 | 6236 | }; |
| 6221 | 6237 | }; |
| 6222 | 6238 | |