Skip to content
  • Ben Gamari's avatar
    llvmGen: Remove -fast-llvm flag · 1a40315c
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Issue #18076 drew my attention to the undocumented `-fast-llvm` flag for
    the LLVM code generator introduced in
    22733532. Speaking to Moritz about this,
    the motivation for this flag was to avoid potential incompatibilities
    between LLVM and the assembler/linker toolchain by making LLVM
    responsible for machine-code generation.
    
    Unfortunately, this cannot possibly work: the LLVM backend's mangler
    performs a number of transforms on the assembler generated by LLVM that
    are necessary for correctness. These are currently:
    
     * mangling Haskell functions' symbol types to be `object` instead of
       `function` on ELF platforms (necessary for tables-next-to-code)
     * mangling AVX instructions to ensure that we don't assume alignment
       (which LLVM otherwise does)
     * mangling Darwin's  subsections-via-symbols directives
    
    Given that these are all necessary I don't believe that we can support
    `-fast-llvm`. Let's rather remove it.
    1a40315c