aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-12-28 15:07:21 -0800
committerGitHub <noreply@github.com>2020-12-28 15:07:21 -0800
commit2df2f0020f4ddc41b3b914cd17efcb403cf0f6ad (patch)
tree8826f40cd08a1cbe945e82bc3f2495a0ed42ad7d /src/main.zig
parentf75d4cbe56f9f8212581f00700600a57ce545ba1 (diff)
parentec3aedffb173845b3fe6f7559e06e1bc3cfde6f7 (diff)
downloadzig-2df2f0020f4ddc41b3b914cd17efcb403cf0f6ad.tar.gz
zig-2df2f0020f4ddc41b3b914cd17efcb403cf0f6ad.zip
Merge pull request #7498 from FireFox317/stage2-llvm
stage2: add initial impl of LLVM backend in self-hosted compiler
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index c23cba98d8..15bb3be602 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1676,7 +1676,7 @@ fn buildOutputType(
if (build_options.have_llvm and emit_asm != .no) {
// LLVM has no way to set this non-globally.
const argv = [_][*:0]const u8{ "zig (LLVM option parsing)", "--x86-asm-syntax=intel" };
- @import("llvm.zig").ParseCommandLineOptions(argv.len, &argv);
+ @import("llvm_bindings.zig").ParseCommandLineOptions(argv.len, &argv);
}
gimmeMoreOfThoseSweetSweetFileDescriptors();
@@ -2839,7 +2839,7 @@ pub fn punt_to_lld(arena: *Allocator, args: []const []const u8) error{OutOfMemor
argv[i] = try arena.dupeZ(u8, arg); // TODO If there was an argsAllocZ we could avoid this allocation.
}
const exit_code = rc: {
- const llvm = @import("llvm.zig");
+ const llvm = @import("llvm_bindings.zig");
const argc = @intCast(c_int, argv.len);
if (mem.eql(u8, args[1], "ld.lld")) {
break :rc llvm.LinkELF(argc, argv.ptr, true);
@@ -3224,7 +3224,7 @@ fn detectNativeTargetInfo(gpa: *Allocator, cross_target: std.zig.CrossTarget) !s
if (!build_options.have_llvm)
fatal("CPU features detection is not yet available for {} without LLVM extensions", .{@tagName(arch)});
- const llvm = @import("llvm.zig");
+ const llvm = @import("llvm_bindings.zig");
const llvm_cpu_name = llvm.GetHostCPUName();
const llvm_cpu_features = llvm.GetNativeFeatures();
info.target.cpu = try detectNativeCpuWithLLVM(arch, llvm_cpu_name, llvm_cpu_features);