mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
zig cc: Remove broken CUDA C/C++ support.
This commit is contained in:
parent
af89bb05d3
commit
5f34224b2b
@ -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")) {
|
||||
|
||||
@ -406,11 +406,10 @@ const usage_build_generic =
|
||||
\\ .s Target-specific assembly source code
|
||||
\\ .S Assembly with C preprocessor (requires LLVM extensions)
|
||||
\\ .c C source code (requires LLVM extensions)
|
||||
\\ .cxx .cc .C .cpp .c++ .stub C++ source code (requires LLVM extensions)
|
||||
\\ .cxx .cc .C .cpp .c++ C++ source code (requires LLVM extensions)
|
||||
\\ .m Objective-C source code (requires LLVM extensions)
|
||||
\\ .mm Objective-C++ source code (requires LLVM extensions)
|
||||
\\ .bc LLVM IR Module (requires LLVM extensions)
|
||||
\\ .cu Cuda source code (requires LLVM extensions)
|
||||
\\
|
||||
\\General Options:
|
||||
\\ -h, --help Print this help and exit
|
||||
@ -1770,7 +1769,7 @@ fn buildOutputType(
|
||||
fatal("only one manifest file can be specified, found '{s}' after '{s}'", .{ arg, other });
|
||||
} else manifest_file = arg;
|
||||
},
|
||||
.assembly, .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .ll, .bc, .m, .mm, .cu => {
|
||||
.assembly, .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .ll, .bc, .m, .mm => {
|
||||
try create_module.c_source_files.append(arena, .{
|
||||
// Populated after module creation.
|
||||
.owner = undefined,
|
||||
@ -1867,7 +1866,7 @@ fn buildOutputType(
|
||||
try cc_argv.appendSlice(arena, it.other_args);
|
||||
},
|
||||
.positional => switch (file_ext orelse Compilation.classifyFileExt(mem.sliceTo(it.only_arg, 0))) {
|
||||
.assembly, .assembly_with_cpp, .c, .cpp, .ll, .bc, .h, .hpp, .hm, .hmm, .m, .mm, .cu => {
|
||||
.assembly, .assembly_with_cpp, .c, .cpp, .ll, .bc, .h, .hpp, .hm, .hmm, .m, .mm => {
|
||||
try create_module.c_source_files.append(arena, .{
|
||||
// Populated after module creation.
|
||||
.owner = undefined,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user