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

    <tr>
        <th>Summary</th>
        <td>
            Not obvious if LTO is supposed to work on Windows
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I am using LTO with Clang on many platforms with my Python compiler (https://nuitka.net) Nuitka.

On Windows, I didn't manage to get LTO to work, neither with winlibs, nor with the official Windows download:

```
$ LANG=C PATH=/c/Program\ Files/LLVM/bin/:$PATH clang --version
clang version 14.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
```

It gives an "unknown file format" error with winlibs, and with LLVM official download from above, a localize error that indicates "invalid or damaged file" (localized, I didn't figure out how to disable that yet). With `file` it states the file is `LLVM IR bitcode`.

I am assuming that the gold LLVM plugin is not available or something. But it's absolutely not obvious to me, otherwise than `find` not revealing anything `*gold*`.

Can you confirm or deny if LTO is supposed to work with the official download on Windows. I assume the GPLv3 nature might be an issue for you?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VNtu2zAM_RrnhYjh-pImD37IXGQrkHXFUGyPg2zJNldZCiTZmff1o2R33Q0DfJNIkeeQh641n8t7YAOMFlUH56cPcEXXQyUZLbWCgakZLpK5VpvBLsZhhsfZ9WRt9HBBKQxE6b537mKj7BilJ7rUiO6ZxUq4KD3Aw7KKkrsoOS7PDwo-o-L6aqO0gnvgyFWU3jqfkXUCnIZOuICIPq_aPHs_JQgA5Qs4rqgk1uG80useWUG3LTbI5EsCoIeSmnGP7hcI0S5Zr2WZ5nA-PryNsrsKHo9P7-iDmDR0PxrdGTZERQUn4kspT-fzp_f0qlF5wp527s9AEyq33U7CWNRqCb1srltwk8dJvCZ9Y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