<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Enrique,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The command line below should emit a bitcode file:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<pre>clang -cc1 -cl-std=CL2.0 -finclude-default-header -emit-llvm-bc -triple spir64 -cl-single-precision-constant INPUT.cl -o INPUT.bc</pre>
Let me know if you have any other issues.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Anastasia<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> cfe-dev <cfe-dev-bounces@lists.llvm.org> on behalf of Enrique González via cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Sent:</b> 20 May 2020 11:59<br>
<b>To:</b> cfe-dev@lists.llvm.org <cfe-dev@lists.llvm.org><br>
<b>Subject:</b> [cfe-dev] Clang command for OpenCL</font>
<div> </div>
</div>
<div>
<div dir="ltr">Dear all,
<div>
<div><br>
</div>
<div>I am trying to use a command like the following one to convert an OpenCL file into a bytecode:</div>
<div><br>
</div>
<div>clang -x cl -cl-std=CL2.0 -emit-llvm -target spir64 -Xclang -finclude-default-header -cl-single-precision-constant INPUT.cl -o INPUT.bc  </div>
<div>
<div><br>
</div>
<div>This command gives me a .llc file as output instead of a .bc. Which is the error? I cannot use the flag "-emit-llvm-bc" without using the frontend. </div>
<div><br>
</div>
<div>I attach the compilation link:</div>
</div>
<div><a href="https://godbolt.org/z/QRgojA">https://godbolt.org/z/QRgojA</a>  </div>
</div>
</div>
</div>
</body>
</html>