<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/137370>137370</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL][SPIRV] Allow source files with extensions other than .hlsl in dxc mode.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
s-perron
</td>
</tr>
</table>
<pre>
Not everyone uses .hlsl for their HLSL source files. Some people follow the GLSL convention to have their files end with an extension based on the shader stage. At this time, these files are treated like object files, and then the compiler fails because the tool chain does not support linking:
```
» clang-dxc -spirv -T cs_6_8 -E main headless.comp -Fo headless.comp.spv 130 ↵ stevenperron@stevenperron-cloudtop
Linking is not supported by this toolchain
UNREACHABLE executed at llvm/llvm-project/clang/lib/Driver/ToolChain.cpp:562!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
```
We should either give a more informative error, or we should assume they are HLSL source files.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzEVMGO2zYQ_Rr6MrBAU5a9Pugg79pNASMIsml7DChyZLFLcQQOpd39-4KymybNrZcaBAyRM4_DN2-eZnbXgFiL6iiqp5WeUk-x5vWIMVJYtWTf64-UAGeM7xQQJkaGovfsoaMIqUcX4cPl-QJMUzQInfPIBTzTgDAijR6hI-_pNcfCLznSUJgxJEcBEkGvZ7zjLLmAwcKrSz3oAPiWMHCObDWjhZzSI3CvLUbgpK9YQJMg9Y4huQGFeswRfC8EdERIEXVCC969IFD7J5p0O83BOticcMM1NIzOY4ROO8_QotETL9VBIvJgeu0CWEKGQAl4GkeKCbwLLy5cRdkIuaydvC_ZiEcljkcwXofr2r4ZWPPo4gzrL2D46-7rA6xPMGTYHrX1yFzkKmB9ph93Ch5n-N9_m1KCOCnxsBPHCjjhjOEmFrGV33-ujafJJhqFbC43fsD9QBtaaN_vnSPyC7dCNr99_HxqHj80x8sJ8A3NlAN1Au_nQahz_luPkXIXhTovvOZt1wp1fopuxijU-QuRf8yAhRlHUTbVTgm1EbL5dDk1zyfgqR1cAg3tdIWISxezFlMaObdRnYU6X13qpzaTf7_35-sd85R1dF505ILxk73pxUTNPbTavKSozaLLMeIYySBnJd_G5W8FamYyblFpnAKwiW5Mxb-lJJs_svZp8hbQpR4jXN2MoGGgiOBCR3HQKW_lHsSMThFevyVp5mlY6ntfJuPnwV3ZurSH8qBXWG_222onVVkeVn1t1U492K7dV7J9qMqyNHJT7Sv5UJa261q1crWSqpJbVW32pdocCtMdWmXVvutkudttjdhKHLTzReawoHhdLezVm3Jf7uXK6xY9L06kVMBXWE6FUtmYYr0Q305XFlvpHSf-Bya55BcLy88R1ZOojs-ffv38u6ieoFms5_sn3rzlm7Ew0EJk6nW4G1se8TcDA1ksVlP09X-Xxf1tc63-CgAA___eA72x">