<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/202142>202142</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [RISC-V][lld] ld.lld windows 19 release missing riscv lto backend
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          XiaobingHou1219
      </td>
    </tr>
</table>

<pre>
    I ran into this while reducing a RISC-V linker testcase. The reproducer is small, and I have been seeing the same result consistently across three reruns.

### Summary
Official Windows ld.lld 19.1.7 rejects both rv32 and rv64 bitcode links with //

### Expected behavior
Link meaningful RISC-V bitcode-only startup programs on Windows through ld.lld/'s LTO path. The same official release package should support LTO for the targets it ships.

### Environment
- linker route: llvm-as 22 plus official Windows ld.lld 19.1.7 with x86_64/aarch64 controls and ld.lld 22 success controls
- march: riscv32i/riscv64i bitcode targets
- mabi: ilp32/lp64
- first failing stage: link
- local stability check: True

### Reduced testcase
These are the reduced input files from the minimized reproducer I used locally:

#### `rv32.ll`
```llvm
target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"
target triple = "riscv32-unknown-elf"

define void @_start() {
  ret void
}
```

#### `rv64.ll`
```llvm
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
target triple = "riscv64-unknown-elf"

define void @_start() {
  ret void
}
```

### Reproduction notes
- This packaged root does not have a single canonical `run.ps1` wrapper.
- Use the reduced inputs under `case/` and follow the commands documented in `case/README.md`.
- Stable witness outputs, when present, are preserved under `verify/run1..run3/`.

### What I checked
- Reduced inputs are preserved under case/.
- Stable witness outputs are preserved under verify/run1..run3/.
- The strict recheck says stable normalized run signatures across three runs: True.
- Tracker guidance link: https://llvm.org/docs/HowToSubmitABug.html
- evidence summary: 3 clean reproductions under hunt/verify/lld_windows_19_riscv_lto_backend_missing/run1..run3 show stable llvm-as success for rv32/rv64/x86_64/aarch64 IR, stable ld.lld 19.1.7 link-time failure on rv32 and rv64 with the exact missing-target diagnostics, stable ld.lld 19.1.7 success on x86_64 and aarch64 controls, and stable ld.lld 22.1.0 success on the same rv32/rv64 bitcode inputs.

### Notes
upstream///llvm-project/lld/test/ELF/lto/riscv.ll and local cross-target controls

Root key: `lld.riscv.windows_19_release_missing_riscv_lto_backend`
Case id: `20260526-lld-windows-19-riscv-lto-backend-missing`

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzEV91u47oRfhr6ZiBBomQ5vvCFdxPjBNj2AEna07uAIscSG4oU-GOv-_QFKcne7CZtLwocQBAScWY4v983Zs7JTiPuyPoLWd-vWPC9sbt_SGZaqbvfTChpuV21Rlx2j2CZBqm9Ad9LB-deKgSLInCpO2Dw9Pj8Nfs7KKnf0IJH5zlzmMNLH8VGa0TgaEE6cANTitCvwLSAR-jZCaFF1OAQoy3fIzg2RDUXlAdutJPOo_bqAoxb4xz43mIUsEG7nBT3pNjPb1pNDzyHYWD2Mn3-_XiUXDIFf0gtzNmBErlSAsptXuYbsPhP5N5Ba3wP9lTR5Js9NTW00nMjMAXm4Cx9D4Qe4vPhrQ_fR-QeBbTYs5M0dhL4JvUbDMi01N0xqCVbs_HMaHUB55n1YYTRms6ywYHRV3d9b03o-tnt5MDGwbeX32Fkvp-ynHJmlkAtKmQOYWT8jXUIrjdBCXBhHI31SfVobEq2Z7ZD70B6cL0cP0vogz5Ja_SA2k9H2VJta4JHUu1BqdOQMQeUwqiCu3nzcdpTNr_fNa9NTeiBMcv7po719tYol2owK1AKLnCOzl2PFx-GqBYvt9LxU0UloYf0Z1PLa_XmEG86rYwqUo0VJfSgxqZezo7SOg9HJlVsRudZN4Um9ds1bMOZiketVNJfgPfI36LQiw34cfKe4qSguA7GdP7So0NgFlMd7Cwj9Rg8HKVCB0drhnQ4SC0H-S8UP07TIwSHYvJHXUi1__DyeD9pitjXuVKkKebzppieWLXp05QmEMwzxS4meCDVPRBK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