diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-27 13:29:32 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-27 13:29:32 -0700 |
| commit | f589a66062fb99c737ab84dc5106add596cc03d4 (patch) | |
| tree | 200f4ed748dd89b0d126b41de742736f54eaadab /src/main.zig | |
| parent | 8c90b05add807bdceb659aed6edba7e591f4e952 (diff) | |
| download | zig-f589a66062fb99c737ab84dc5106add596cc03d4.tar.gz zig-f589a66062fb99c737ab84dc5106add596cc03d4.zip | |
stage2: make cuda file extensions a separate enum tag than c++
follow-up to 2f41bd3be438dae2a188cfae3295dc28f4e9d434.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index b32da74ef6..52b1353b9d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -298,6 +298,7 @@ const usage_build_generic = \\ .m Objective-C source code (requires LLVM extensions) \\ .mm Objective-C++ source code (requires LLVM extensions) \\ .bc LLVM IR Module (requires LLVM extensions) + \\ .cu .stub Cuda source code (requires LLVM extensions) \\ \\General Options: \\ -h, --help Print this help and exit @@ -1247,7 +1248,7 @@ fn buildOutputType( .object, .static_library, .shared_library => { try link_objects.append(.{ .path = arg }); }, - .assembly, .c, .cpp, .h, .ll, .bc, .m, .mm => { + .assembly, .c, .cpp, .h, .ll, .bc, .m, .mm, .cuda => { try c_source_files.append(.{ .src_path = arg, .extra_flags = try arena.dupe([]const u8, extra_cflags.items), @@ -1315,7 +1316,9 @@ fn buildOutputType( .positional => { const file_ext = Compilation.classifyFileExt(mem.sliceTo(it.only_arg, 0)); switch (file_ext) { - .assembly, .c, .cpp, .ll, .bc, .h, .m, .mm => try c_source_files.append(.{ .src_path = it.only_arg }), + .assembly, .c, .cpp, .ll, .bc, .h, .m, .mm, .cuda => { + try c_source_files.append(.{ .src_path = it.only_arg }); + }, .unknown, .shared_library, .object, .static_library => { try link_objects.append(.{ .path = it.only_arg, |
