diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-08-10 12:02:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-10 12:02:57 -0700 |
| commit | b820d5df79e714b3a3ad3c09480abdafff058de8 (patch) | |
| tree | b6fcf4066de92f3ab01a56166719757aef2e0a83 /src/Compilation.zig | |
| parent | 275e926cf851144ef6a4c64963e47f3b955870cc (diff) | |
| parent | c4848694d20c19b78657ee46f18028737290c829 (diff) | |
| download | zig-b820d5df79e714b3a3ad3c09480abdafff058de8.tar.gz zig-b820d5df79e714b3a3ad3c09480abdafff058de8.zip | |
Merge pull request #16747 from jacobly0/llvm-wo-libllvm
llvm: enable the backend even when not linked to llvm
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 0437d4a2ab..47e13ba85c 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1027,7 +1027,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { return error.TargetRequiresSingleThreaded; } - const llvm_cpu_features: ?[*:0]const u8 = if (build_options.have_llvm and use_llvm) blk: { + const llvm_cpu_features: ?[*:0]const u8 = if (use_llvm) blk: { var buf = std.ArrayList(u8).init(arena); for (options.target.cpu.arch.allFeaturesList(), 0..) |feature, index_usize| { const index = @as(Target.Cpu.Feature.Set.Index, @intCast(index_usize)); @@ -5182,7 +5182,7 @@ pub fn dump_argv(argv: []const []const u8) void { } pub fn getZigBackend(comp: Compilation) std.builtin.CompilerBackend { - if (build_options.have_llvm and comp.bin_file.options.use_llvm) return .stage2_llvm; + if (comp.bin_file.options.use_llvm) return .stage2_llvm; const target = comp.bin_file.options.target; if (target.ofmt == .c) return .stage2_c; return switch (target.cpu.arch) { |
