diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-18 18:43:48 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-10-19 16:51:11 -0400 |
| commit | 4d106076c3db840f786460e281aded056053ac35 (patch) | |
| tree | 34b1c1babde7ae4dfafbedf550f04a251927e4c7 /src/link.zig | |
| parent | 530dc0405c9f48fa3b241f078cf815164e4448ab (diff) | |
| download | zig-4d106076c3db840f786460e281aded056053ac35.tar.gz zig-4d106076c3db840f786460e281aded056053ac35.zip | |
link: initialize llvm before calling the llvm API
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig index f7770b6f82..9c79de290d 100644 --- a/src/link.zig +++ b/src/link.zig @@ -1150,7 +1150,9 @@ pub const File = struct { } const llvm_bindings = @import("codegen/llvm/bindings.zig"); + const Builder = @import("codegen/llvm/Builder.zig"); const llvm = @import("codegen/llvm.zig"); + Builder.initializeLLVMTarget(base.options.target.cpu.arch); const os_tag = llvm.targetOs(base.options.target.os.tag); const bad = llvm_bindings.WriteArchive(full_out_path_z, object_files.items.ptr, object_files.items.len, os_tag); if (bad) return error.UnableToWriteArchive; |
