diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-12-17 01:24:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 01:24:46 -0500 |
| commit | e5c188e59a827bd7049f80bf51c8c4e59e016af2 (patch) | |
| tree | 529b7ba2bff39a79532d54eba9a869fc44de3bdd /src/Compilation.zig | |
| parent | 0c457fa7ebc1af94e800a23d228962f6d0a372a5 (diff) | |
| parent | 181330bbd44af65da037e681199fc54176f35a3d (diff) | |
| download | zig-e5c188e59a827bd7049f80bf51c8c4e59e016af2.tar.gz zig-e5c188e59a827bd7049f80bf51c8c4e59e016af2.zip | |
Merge pull request #22251 from alexrp/remove-cuda
`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")) { |
