| ... | @@ -305,7 +305,6 @@ pub const LangToExt = std.StaticStringMap(FileExt).initComptime(.{ | ... | @@ -305,7 +305,6 @@ pub const LangToExt = std.StaticStringMap(FileExt).initComptime(.{ |
| 305 | .{ "objective-c++-header", .hmm }, | 305 | .{ "objective-c++-header", .hmm }, |
| 306 | .{ "assembler", .assembly }, | 306 | .{ "assembler", .assembly }, |
| 307 | .{ "assembler-with-cpp", .assembly_with_cpp }, | 307 | .{ "assembler-with-cpp", .assembly_with_cpp }, |
| 308 | .{ "cuda", .cu }, | | |
| 309 | }); | 308 | }); |
| 310 | | 309 | |
| 311 | /// For passing to a C compiler. | 310 | /// For passing to a C compiler. |
| ... | @@ -4699,7 +4698,6 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr | ... | @@ -4699,7 +4698,6 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr |
| 4699 | .hm => "objective-c-header", | 4698 | .hm => "objective-c-header", |
| 4700 | .mm => "objective-c++", | 4699 | .mm => "objective-c++", |
| 4701 | .hmm => "objective-c++-header", | 4700 | .hmm => "objective-c++-header", |
| 4702 | .cu => "cuda", | | |
| 4703 | else => fatal("language '{s}' is unsupported in this context", .{@tagName(ext)}), | 4701 | else => fatal("language '{s}' is unsupported in this context", .{@tagName(ext)}), |
| 4704 | } }); | 4702 | } }); |
| 4705 | } | 4703 | } |
| ... | @@ -5583,7 +5581,6 @@ pub fn addCCArgs( | ... | @@ -5583,7 +5581,6 @@ pub fn addCCArgs( |
| 5583 | .hm, | 5581 | .hm, |
| 5584 | .mm, | 5582 | .mm, |
| 5585 | .hmm, | 5583 | .hmm, |
| 5586 | .cu, | | |
| 5587 | => { | 5584 | => { |
| 5588 | try argv.append("-fno-spell-checking"); | 5585 | try argv.append("-fno-spell-checking"); |
| 5589 | | 5586 | |
| ... | @@ -5821,7 +5818,6 @@ fn failWin32ResourceWithOwnedBundle( | ... | @@ -5821,7 +5818,6 @@ fn failWin32ResourceWithOwnedBundle( |
| 5821 | pub const FileExt = enum { | 5818 | pub const FileExt = enum { |
| 5822 | c, | 5819 | c, |
| 5823 | cpp, | 5820 | cpp, |
| 5824 | cu, | | |
| 5825 | h, | 5821 | h, |
| 5826 | hpp, | 5822 | hpp, |
| 5827 | hm, | 5823 | hm, |
| ... | @@ -5852,7 +5848,6 @@ pub const FileExt = enum { | ... | @@ -5852,7 +5848,6 @@ pub const FileExt = enum { |
| 5852 | | 5848 | |
| 5853 | .c, | 5849 | .c, |
| 5854 | .cpp, | 5850 | .cpp, |
| 5855 | .cu, | | |
| 5856 | .m, | 5851 | .m, |
| 5857 | .mm, | 5852 | .mm, |
| 5858 | .ll, | 5853 | .ll, |
| ... | @@ -5874,7 +5869,7 @@ pub const FileExt = enum { | ... | @@ -5874,7 +5869,7 @@ pub const FileExt = enum { |
| 5874 | | 5869 | |
| 5875 | pub fn clangSupportsDiagnostics(ext: FileExt) bool { | 5870 | pub fn clangSupportsDiagnostics(ext: FileExt) bool { |
| 5876 | return switch (ext) { | 5871 | return switch (ext) { |
| 5877 | .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu, .ll, .bc => true, | 5872 | .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .ll, .bc => true, |
| 5878 | | 5873 | |
| 5879 | .assembly, | 5874 | .assembly, |
| 5880 | .assembly_with_cpp, | 5875 | .assembly_with_cpp, |
| ... | @@ -5893,7 +5888,7 @@ pub const FileExt = enum { | ... | @@ -5893,7 +5888,7 @@ pub const FileExt = enum { |
| 5893 | | 5888 | |
| 5894 | pub fn clangSupportsDepFile(ext: FileExt) bool { | 5889 | pub fn clangSupportsDepFile(ext: FileExt) bool { |
| 5895 | return switch (ext) { | 5890 | return switch (ext) { |
| 5896 | .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu => true, | 5891 | .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm => true, |
| 5897 | | 5892 | |
| 5898 | .ll, | 5893 | .ll, |
| 5899 | .bc, | 5894 | .bc, |
| ... | @@ -5915,7 +5910,6 @@ pub const FileExt = enum { | ... | @@ -5915,7 +5910,6 @@ pub const FileExt = enum { |
| 5915 | return switch (ext) { | 5910 | return switch (ext) { |
| 5916 | .c => ".c", | 5911 | .c => ".c", |
| 5917 | .cpp => ".cpp", | 5912 | .cpp => ".cpp", |
| 5918 | .cu => ".cu", | | |
| 5919 | .h => ".h", | 5913 | .h => ".h", |
| 5920 | .hpp => ".hpp", | 5914 | .hpp => ".hpp", |
| 5921 | .hm => ".hm", | 5915 | .hm => ".hm", |
| ... | @@ -5967,8 +5961,7 @@ pub fn hasCppExt(filename: []const u8) bool { | ... | @@ -5967,8 +5961,7 @@ pub fn hasCppExt(filename: []const u8) bool { |
| 5967 | mem.endsWith(u8, filename, ".CPP") or | 5961 | mem.endsWith(u8, filename, ".CPP") or |
| 5968 | mem.endsWith(u8, filename, ".cpp") or | 5962 | mem.endsWith(u8, filename, ".cpp") or |
| 5969 | mem.endsWith(u8, filename, ".cxx") or | 5963 | mem.endsWith(u8, filename, ".cxx") or |
| 5970 | mem.endsWith(u8, filename, ".c++") or | 5964 | mem.endsWith(u8, filename, ".c++"); |
| 5971 | mem.endsWith(u8, filename, ".stub"); | | |
| 5972 | } | 5965 | } |
| 5973 | | 5966 | |
| 5974 | pub fn hasCppHExt(filename: []const u8) bool { | 5967 | pub fn hasCppHExt(filename: []const u8) bool { |
| ... | @@ -6054,8 +6047,6 @@ pub fn classifyFileExt(filename: []const u8) FileExt { | ... | @@ -6054,8 +6047,6 @@ pub fn classifyFileExt(filename: []const u8) FileExt { |
| 6054 | return .static_library; | 6047 | return .static_library; |
| 6055 | } else if (hasObjectExt(filename)) { | 6048 | } else if (hasObjectExt(filename)) { |
| 6056 | return .object; | 6049 | return .object; |
| 6057 | } else if (mem.endsWith(u8, filename, ".cu")) { | | |
| 6058 | return .cu; | | |
| 6059 | } else if (mem.endsWith(u8, filename, ".def")) { | 6050 | } else if (mem.endsWith(u8, filename, ".def")) { |
| 6060 | return .def; | 6051 | return .def; |
| 6061 | } else if (std.ascii.endsWithIgnoreCase(filename, ".rc")) { | 6052 | } else if (std.ascii.endsWithIgnoreCase(filename, ".rc")) { |