aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-26 19:58:05 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:21 -0700
commit6beae6c061a650ea2d695e6902683641df920aa8 (patch)
tree9a8264bfdce3b56d1e6775357f3cb44dd799d39a /src/Compilation
parent951c5b3f67e086c50ba8d0cd9318cb770fd3f724 (diff)
downloadzig-6beae6c061a650ea2d695e6902683641df920aa8.tar.gz
zig-6beae6c061a650ea2d695e6902683641df920aa8.zip
frontend: avoid spurious error when no zcu
use_llvm=false does not always mean there needs to be a zig compiler backend available. In particular, when there is no zig compilation unit, use_llvm=false and yet no zig backend will be used to produce code.
Diffstat (limited to 'src/Compilation')
-rw-r--r--src/Compilation/Config.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig
index dcf908ef2f..d5f3b2ef95 100644
--- a/src/Compilation/Config.zig
+++ b/src/Compilation/Config.zig
@@ -237,7 +237,7 @@ pub fn resolve(options: Options) ResolveError!Config {
break :b !target_util.selfHostedBackendIsAsRobustAsLlvm(target);
};
- if (options.emit_bin) {
+ if (options.emit_bin and options.have_zcu) {
if (!use_lib_llvm and use_llvm) {
// Explicit request to use LLVM to produce an object file, but without
// using LLVM libraries. Impossible.