aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-04-28 19:59:56 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-08 19:37:29 -0700
commit78002dbe47c9dec430754c3a3f1d62c1b11df08d (patch)
tree9e3537671e2e3a6b277817f71ec5e8cb1a37e840 /src/codegen
parent06ee65af9ed6aa5ee4d1d7f4fab9d7acecf66e76 (diff)
downloadzig-78002dbe47c9dec430754c3a3f1d62c1b11df08d.tar.gz
zig-78002dbe47c9dec430754c3a3f1d62c1b11df08d.zip
add detect-cpu subcommand for debugging CPU features
This brings back `detectNativeCpuWithLLVM` so that we can troubleshoot during LLVM upgrades. closes #19793
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm/bindings.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index f1080a4694..0f4caab442 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -400,3 +400,9 @@ extern fn ZigLLVMWriteImportLibrary(
output_lib_path: [*:0]const u8,
kill_at: bool,
) bool;
+
+pub const GetHostCPUName = LLVMGetHostCPUName;
+extern fn LLVMGetHostCPUName() ?[*:0]u8;
+
+pub const GetHostCPUFeatures = LLVMGetHostCPUFeatures;
+extern fn LLVMGetHostCPUFeatures() ?[*:0]u8;