Skip to content

completely eliminate dependency on LLVM library API calls #25492

@andrewrk

Description

@andrewrk

Issue close criteria:

  • Delete src/zig_llvm.cpp, src/zig_llvm.h, and src/codegen/llvm/bindings.zig

Prerequisite of:

Depends on:

  • completely eliminate dependency on LLD #8726
  • zig ar: a drop-in llvm-ar replacement #9828
  • Figure out how to achieve ZigLLVMTargetMachineEmitToFile via passing an LLVM bitcode file (.bc) to the Clang command line. This may require getting patches landed upstream.
    • challenge: enabling tsan
    • challenge: enabling sancov
    • challenge: setting the options of ZigLLVMCoverageOptions, in particular with the desired pass orderings
    • challenge: enabling IR verification
  • how to do equivalent of ZigLLVMSetOptBisectLimit with clang CLI

This issue mainly concerns transitioning from calling into LLVM as a library into calling into Clang as a standalone executable. For the purposes of this issue it doesn't matter whether Clang is exposed via a sub-command of the zig binary (zig clang), or whether clang is found at runtime. The point is that object files are produced by creating bitcode files and then invoking clang as a separate process to compile those bitcode files into object files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-llvmThe LLVM backend outputs an LLVM IR Module.enhancementSolving this issue will likely involve adding new logic or components to the codebase.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions