| ... | @@ -1024,10 +1024,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { | ... | @@ -1024,10 +1024,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 1024 | if (options.use_llvm) |explicit| | 1024 | if (options.use_llvm) |explicit| |
| 1025 | break :blk explicit; | 1025 | break :blk explicit; |
| 1026 | | 1026 | |
| 1027 | // If we are outputting .c code we must use Zig backend. | | |
| 1028 | if (ofmt == .c) | | |
| 1029 | break :blk false; | | |
| 1030 | | | |
| 1031 | // If emitting to LLVM bitcode object format, must use LLVM backend. | 1027 | // If emitting to LLVM bitcode object format, must use LLVM backend. |
| 1032 | if (options.emit_llvm_ir != null or options.emit_llvm_bc != null) | 1028 | if (options.emit_llvm_ir != null or options.emit_llvm_bc != null) |
| 1033 | break :blk true; | 1029 | break :blk true; |
| ... | @@ -1042,7 +1038,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { | ... | @@ -1042,7 +1038,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 1042 | break :blk true; | 1038 | break :blk true; |
| 1043 | | 1039 | |
| 1044 | // If LLVM does not support the target, then we can't use it. | 1040 | // If LLVM does not support the target, then we can't use it. |
| 1045 | if (!target_util.hasLlvmSupport(options.target)) | 1041 | if (!target_util.hasLlvmSupport(options.target, ofmt)) |
| 1046 | break :blk false; | 1042 | break :blk false; |
| 1047 | | 1043 | |
| 1048 | // Prefer LLVM for release builds. | 1044 | // Prefer LLVM for release builds. |