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

    <tr>
        <th>Summary</th>
        <td>
            Unable to successfully run tests for ORC 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>
          aganea
      </td>
    </tr>
</table>

<pre>
    The ORC tests on Windows don't pass successfully. Using latest Visual Studio 17.8.3 on Windows 11 version 23H2. Using LLVM commit https://github.com/llvm/llvm-project/commit/6c2fbc3a68ba6d4bd1c8c2c43c98cff5e82f2ba4. I am including a branch below with an easy repro.

Just open an elevated admin cmd.exe and run the following. This runs the official Windows LLVM release script:
```
C:\git>git clone https://github.com/aganea/llvm-project.git
...
C:\git>cd llvm-project && git switch bugreport_orc_tests && cd ..
...
C:\git>llvm-project\llvm\utils\release\build_llvm_release.bat --version 18.0.0 --x64
...
Failed Tests (9):
  ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.c
  ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.cpp
  ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer-three.c
 ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer.c
 ORC-x86_64-windows :: TestCases/Windows/x86-64/sehframe-handling.cpp
 ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.S
 ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.cpp
 ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-atexit.c
 ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-jit-dlopen.c


Testing Time: 694.52s

Total Discovered Tests: 2966
  Unsupported      : 1351 (45.55%)
  Passed           : 1568 (52.87%)
  Expectedly Failed:   38 (1.28%)
  Failed           :    9 (0.30%)
```

See full error log: [orc_test_errors.txt](https://github.com/llvm/llvm-project/files/13924827/orc_test_errors.txt)

@lhames @benlangmuir are you able to help/take a look please?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VluP2zYT_TX0y0CERF0sPfgh8cb4viJFi-5u-mhQ5EhiQpMCSa3t_vqCsrW3LgqkmxgGDWsOD0dnLhzuveoN4oaUH0l5s-JTGKzb8J4b5KvWyvPmbkD47Y8tBPTBgzXwpzLSHj1IawhbBxi59-AnIdD7btL6TOHeK9OD5nEPfFF-4hpuwySVhWxNa5o_58kyeEDnlTXA8v-xZffnz19-BWEPBxVgCGH0JP9A2I6wXa_CMLVU2ANhO60flp9kdPYrikDY7rKPsF0lWNeKnFd1yytZtDITtWCiyEVTi64rsWYda3lB4f_AD6CM0JOMx3NoHTdigBa1PcJRhQG4AeT-DA5HZylJb0j64bL-MvkAdkQzYzQ-8IASuDwoA-IgKZ4QuJHgJgNhQOis1vaoTE_hblA-PvezwXadEorrR3VmGRxq5B7BC6fGEIW4nF2l1-_8dxsN5bZXgeSfehVAaGvw38S7xPmVfDQSzISU0jeYhYTncCCsIqyCeKA_qhAlm3qHo3Vhb53YXxLnihISFtK32V8EstzO4S23U1Dak3J7FYKU23ZSWu6jeX99SFseIEmWXMpqmtIUkuRUFa8O3HGlUcLd1bG6Iax5FBVitienutpXRXK8RiFa8w_zji336AnbXQNE2O5UV0lVELYbUGubHK3TkoofyzaO7-YbnbJOhXPiAw9KJMqooLhWf6FLwuAQH33-GUe8n9zj0Dl-wGTgRupYO0-q_HfSfzp6-xM4f4CnwakHxXXCA55UeL-cC99XFRKpY-9aOJ-vkSS2wzt1wEhaNQUtmX8BsYFruFFe2Ad0S11FMGuqaknbe-OnMfYElDB_IiDLyywWYFHSsiSsjHV4xf_OvV-gT_iyqiO-ZLRev8R_Oo0oAkp9hkt5RzxAPuMzyuqX8GsLeEkPAE2EpzRPn8Nf9dnLeosI8boDdM460LaPFKT8uPS8_WzwNJwCKW8Iq7_7FuuUnqOX5Q0rarYmbPcW-aObl7VI9c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