diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-10-11 00:53:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-11 00:53:07 -0700 |
| commit | 5722261e6474e8bac5b8cb341b6344100b8514f2 (patch) | |
| tree | 8fc8006e8f3cedeac4a45c88305bc0eb0b0e3fb0 /src/Compilation.zig | |
| parent | 42998e637b29df66992d10be270fb97e47758fba (diff) | |
| parent | da7e4fb31a05f2063eb829c4c383a44b38ed21e1 (diff) | |
| download | zig-5722261e6474e8bac5b8cb341b6344100b8514f2.tar.gz zig-5722261e6474e8bac5b8cb341b6344100b8514f2.zip | |
Merge pull request #17465
Compilation: default to self-hosted backends when not using libllvm
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index cd4c6ea11b..25d0d63b1e 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -845,6 +845,12 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { if (options.main_mod == null) break :blk false; + // If we cannot use LLVM libraries, then our own backends will be a + // better default since the LLVM backend can only produce bitcode + // and not an object file or executable. + if (!use_lib_llvm) + break :blk false; + // If LLVM does not support the target, then we can't use it. if (!target_util.hasLlvmSupport(options.target, options.target.ofmt)) break :blk false; |
