aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-01 17:29:31 -0400
committerGitHub <noreply@github.com>2022-07-01 17:29:31 -0400
commit2360f8c490f3ec684ed64ff28e8c1fade249070b (patch)
treef39083118406b53b0de41b99ee88a4269cc537ab /src/Compilation.zig
parent7e2eb1326ba267012d47aa2eda539f01963d4d6b (diff)
parent095e24e537fcb6a702b992d946d1ca73d6f608b3 (diff)
downloadzig-2360f8c490f3ec684ed64ff28e8c1fade249070b.tar.gz
zig-2360f8c490f3ec684ed64ff28e8c1fade249070b.zip
Merge pull request #11974 from ziglang/fixfixfix
stage2 fixes
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index c6c7a94b41..99b502dbd7 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1024,10 +1024,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
if (options.use_llvm) |explicit|
break :blk explicit;
- // If we are outputting .c code we must use Zig backend.
- if (ofmt == .c)
- break :blk false;
-
// If emitting to LLVM bitcode object format, must use LLVM backend.
if (options.emit_llvm_ir != null or options.emit_llvm_bc != null)
break :blk true;
@@ -1042,7 +1038,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
break :blk true;
// If LLVM does not support the target, then we can't use it.
- if (!target_util.hasLlvmSupport(options.target))
+ if (!target_util.hasLlvmSupport(options.target, ofmt))
break :blk false;
// Prefer LLVM for release builds.