<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58752>58752</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
--emit-static-lib breaks compilation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
IcePlaneswalker
</td>
</tr>
</table>
<pre>
I am trying to build a static .lib file on windows.
This is my version of clang.
>clang --version
clang version 15.0.2
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Installs\LLVM\bin
Here is the output from clang whenever I add the '--emit-static-lib' argument
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang src/vendor/raylib-4.2.0/src/raudio.c src/vendor/raylib-4.2.0/src/rcore.c src/vendor/raylib-4.2.0/src/rmodels.c src/vendor/raylib-4.2.0/src/rshapes.c src/vendor/raylib-4.2.0/src/rtext.c src/vendor/raylib-4.2.0/src/rtextures.c src/vendor/raylib-4.2.0/src/utils.c src/vendor/raylib-4.2.0/src/rglfw.c -std=gnu99 -mavx2 -fno-sanitize=undefined --emit-static-lib -O0 -g -fuse-ld=lld -DPLATFORM_DESKTOP -DGL_SILENCE_DEPRECATION=199309L -DSM_DEBUG -D_CRT_SECURE_NO_WARNINGS -Isrc/vendor/raylib-4.2.0/src/external/glfw/include -o bin\\raylib.lib
1. Compilation construction
2. Building compilation jobs
3. Building compilation jobs
Exception Code: 0x80000003
#0 0x00007ff626ab9f11 (C:\Installs\LLVM\bin\clang.exe+0x19f11)
#1 0x00007ff62726811c (C:\Installs\LLVM\bin\clang.exe+0x7c811c)
#2 0x00007ff6272556fa (C:\Installs\LLVM\bin\clang.exe+0x7b56fa)
#3 0x00007ff62725455e (C:\Installs\LLVM\bin\clang.exe+0x7b455e)
#4 0x00007ff62724924e (C:\Installs\LLVM\bin\clang.exe+0x7a924e)
#5 0x00007ff627241bd0 (C:\Installs\LLVM\bin\clang.exe+0x7a1bd0)
#6 0x00007ff626aa40bf (C:\Installs\LLVM\bin\clang.exe+0x40bf)
#7 0x00007ff62ac88640 (C:\Installs\LLVM\bin\clang.exe+0x41e8640)
#8 0x00007ffecf07244d (C:\Windows\System32\KERNEL32.DLL+0x1244d)
#9 0x00007ffed12adfb8 (C:\Windows\SYSTEM32\ntdll.dll+0x5dfb8)
Am I using it incorrectly or is this a legit bug?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVtty4jgQ_RrzorLL98sDDwScLDUMSQGzU_tEyZIMmsgWJckJzNdvyyYTmNnaIqGMLLdOH3e3Wt2uJD2N5wg3yKgTb3fISFR1XFCEkTbYcII8wStUc8GQbNErb6l81Z7jzxx_stlzjeBqTuiFKc0BIGtEBG53Z8R5jMpeiFz3jBvkg_BNNUg83wvPzFjtmHGiCTrm6TaN3QNxz-92G_1C3t6vGKaokZQJiz1IzY_D0rwF84VgdMaVXZrC4CTTs1jDdLH4-yvcKt5emvoXU8y6ZPbgb2cOnUG1ks3gFHrds5aBvQhCRmkPcsLMdVnDjTvEy4VwgQyBA13DWnNJ_rQoJ-sS6a4CPES46nZIsYNUxsZ9b8xBWzPDe7h23Oy7yiOygQchXt5u7kHJH4wYeORad0zDBOGWIt4S0VHWG0UU1ntUYfJsFCbMCafoAC9SkjCtGUVadmoQW02stSQcG1hQXYs0Ufxgzhu4NkCCaNccrGW9yPdQ_3tScqcgc948tbaf46QVAbNeGGyYgonCJ4iKG3uh58PjsKpwR7n0yG1gIhW7Fdvng74Vrff4wG5GG3Y0H8F26mbuzvDbrd6J-hWwkHTUiWa7tisK5Db45Rgit26lq3HLDf_JYLFrKat5C7v7R6Ii99FHLpzLutPMFZZKwNl3Z0-Lyeb-cfV1OyvXXzaPTyB6WGzX80W5nJYgfFqV08lm_rgEjaAoIr9YAGRt8XffHmC6na4223U5_bYqt8vH7ffJajlfPqyRO7_FP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