Closed
Description
Environment
$ zig version --verbose
0.14.0
$ uname -a
Darwin MacBook-Air 23.6.0 Darwin Kernel Version 23.6.0; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 arm64
$ /opt/homebrew/opt/llvm/bin/llvm-config --version
20.1.3
Issue
When running tests in src/llvm.zig
, it raises error:
Running test: llvm.zig - all LLVM modules
Command failed: /opt/homebrew/bin/zig test --test-filter all LLVM modules ~/.../llvm-zig/src/llvm.zig
llvm intrinsics cannot be defined!
ptr @"llvm.test.all LLVM modules"
LLVM ERROR: Broken module found, compilation aborted!
Possible reasons and mitigations
I found two similar issues in zig-lang upstream, it's not fixed yet.
ziglang/zig#11525
ziglang/zig#2291
It can be mitigated by change the name of llvm.zig
to _llvm.zig
.