Skip to content

Commit 3384749

Browse files
committed
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.
1 parent 8e9bb69 commit 3384749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Compilation/Config.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn resolve(options: Options) ResolveError!Config {
237237
break :b !target_util.selfHostedBackendIsAsRobustAsLlvm(target);
238238
};
239239

240-
if (options.emit_bin) {
240+
if (options.emit_bin and options.have_zcu) {
241241
if (!use_lib_llvm and use_llvm) {
242242
// Explicit request to use LLVM to produce an object file, but without
243243
// using LLVM libraries. Impossible.

0 commit comments

Comments
 (0)