diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-12-15 05:45:53 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-12-15 05:45:53 +0100 |
| commit | 5f34224b2b4afed00c412fccaf20eef0a7dbedcc (patch) | |
| tree | 3cbd3561afe24ffab073f62d189a7d9b7217c62f /src/Compilation.zig | |
| parent | af89bb05d392b34a9ac257d166df1c794542f2e8 (diff) | |
| download | zig-5f34224b2b4afed00c412fccaf20eef0a7dbedcc.tar.gz zig-5f34224b2b4afed00c412fccaf20eef0a7dbedcc.zip | |
zig cc: Remove broken CUDA C/C++ support.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 1c4c97e06f..b6cb08485d 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -305,7 +305,6 @@ pub const LangToExt = std.StaticStringMap(FileExt).initComptime(.{ .{ "objective-c++-header", .hmm }, .{ "assembler", .assembly }, .{ "assembler-with-cpp", .assembly_with_cpp }, - .{ "cuda", .cu }, }); /// For passing to a C compiler. @@ -4699,7 +4698,6 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr .hm => "objective-c-header", .mm => "objective-c++", .hmm => "objective-c++-header", - .cu => "cuda", else => fatal("language '{s}' is unsupported in this context", .{@tagName(ext)}), } }); } @@ -5583,7 +5581,6 @@ pub fn addCCArgs( .hm, .mm, .hmm, - .cu, => { try argv.append("-fno-spell-checking"); @@ -5821,7 +5818,6 @@ fn failWin32ResourceWithOwnedBundle( pub const FileExt = enum { c, cpp, - cu, h, hpp, hm, @@ -5852,7 +5848,6 @@ pub const FileExt = enum { .c, .cpp, - .cu, .m, .mm, .ll, @@ -5874,7 +5869,7 @@ pub const FileExt = enum { pub fn clangSupportsDiagnostics(ext: FileExt) bool { return switch (ext) { - .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu, .ll, .bc => true, + .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .ll, .bc => true, .assembly, .assembly_with_cpp, @@ -5893,7 +5888,7 @@ pub const FileExt = enum { pub fn clangSupportsDepFile(ext: FileExt) bool { return switch (ext) { - .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu => true, + .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm => true, .ll, .bc, @@ -5915,7 +5910,6 @@ pub const FileExt = enum { return switch (ext) { .c => ".c", .cpp => ".cpp", - .cu => ".cu", .h => ".h", .hpp => ".hpp", .hm => ".hm", @@ -5967,8 +5961,7 @@ pub fn hasCppExt(filename: []const u8) bool { mem.endsWith(u8, filename, ".CPP") or mem.endsWith(u8, filename, ".cpp") or mem.endsWith(u8, filename, ".cxx") or - mem.endsWith(u8, filename, ".c++") or - mem.endsWith(u8, filename, ".stub"); + mem.endsWith(u8, filename, ".c++"); } pub fn hasCppHExt(filename: []const u8) bool { @@ -6054,8 +6047,6 @@ pub fn classifyFileExt(filename: []const u8) FileExt { return .static_library; } else if (hasObjectExt(filename)) { return .object; - } else if (mem.endsWith(u8, filename, ".cu")) { - return .cu; } else if (mem.endsWith(u8, filename, ".def")) { return .def; } else if (std.ascii.endsWithIgnoreCase(filename, ".rc")) { |
