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

    <tr>
        <th>Summary</th>
        <td>
            Pass flags to llvm-spirv translator
        </td>
    </tr>

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

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

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

<pre>
    I'm compiling C++ for OpenCL using clang compilers (I have tried 14 and 15) by invoking the following command:
```
/usr/local/bin/clang-15 -c -target spirv64 -cl-std=clc++2021 -cl-ext=-cl_khr_fp64 "kernel.clcpp" -o "kernel.spv"
```
When using simple `printf("%f\n", num)` for debugging I run into problems with double point preicision conversions, since this is (apparently) done implicitly inside the print.
```
error: Double type is not supported on this platform.
```
I want to disable the extension for double precision (`cl_khr_fp64`) which apparently is done by passing this argument: `-cl-ext=-cl_khr_fp64` to the compiler. This does not work with `-cl-std=clc++2021`, which leaves me wondering if there are other ways of passing flags to the llvm-spirv translator?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtU8-P2ywQ_WucyygRIXHWe_ChzWqllSr1O1TqscL2OGYXAwKcfPnv-yBpt4dIiB8DM_Pem6Fzw7V9q-TTTL2bvTbanuhYya8YNLpA3z3b4zdaYr7ojcpzecghUiWbN5rUmSkFzQNt96QslrqSz9RdSduz-8iOaWJEM8Zd9C3AjHfV7kslXirxpTqI-7gd5esSA2bjemWwdtpiLsnX25rWPa2TCidOFL0O58MeJrOOCRFfetPf0Esht8XO_yfYsfv1MYVfo8fzSsoPDpbNBs-9x5HW7h9r9GccHoL7ObG9qxH17A0TrnzQNo1QI3vJeqzqoy3bI9llhhh4U9QcuFtOp-z8RmGxECg58sF1hudIF50mGtyCE3mHO1yx7nXUzkI0e4bm2MYcFwh6yD7pSLoUQnmvAttkrln8wVmmjA_uMCFR1AOXOhSwm4fkOAQXUBZ6uYFIV885vHWQevHehYQqA0zJ641KIDU_jvVGFwUG4DfoqEo0JEcx2BY-RY4718B3klnCg_inVDkc6Fwm3U_0STGDKhTRZF7FeOsxGNEWy4wnmQR8H9c_VwO4Mp4_vbyhH1OJyTe2Fxc-bvW4R3nQXQXb8Y7NML5BpJnhagcOGZEec47AQMXk8haaXCO58S_o0ahT_APGmPO8Li2N_6RshL65HK-rod0Nz7tntUooJrf_wfnT86HXagmmnVLyMf8y-YpxApul24Bx_lpwui9r9N879wlHHePCaK_Xum7EYTW1kneiGbq6GZtmVzcHFt1-L7dy7He1GLb7lVEdm9hWNUSRli9UQuTer19WuoVMUhzEVjTyIHYb-bQTqlPNcBjrvRBP1V7wrLTZZBwbF06r0BZI-CURl0bHFD8vs2Yny1zSIb5a0uRC--6sit30vpiY1LAqCNrC4Dd2qpWl">