Skip to content

Name clash with LLVM intrinsics #5

Closed
@junyucao1024

Description

@junyucao1024

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamupstream issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions