<div dir="ltr">
<div>Hello,</div><div><br></div><div>I am working on porting CPython to 
build with clang-cl on Windows, since I expect things like labels as 
values and other optimizations could provide a significant speedup. I am
 currently running into a strange issue, and was directed here from IRC.
 When I have, for example,</div><div><br></div><div>
#include <intrin.h><br>#include <immintrin.h><br><br>int main() {<br>    _InterlockedCompareExchange64_<wbr>HLEAcquire(4L, 5L, 6L);<br>} <br></div><div><br></div><div>building
 with cl is fine (minus obvious warnings about long to pointer 
conversion). However, if I build with clang-cl, I get "unresolved 
external symbol _InterlockedCompareExchange64_<wbr>HLEAcquire referenced
 in function main". When I build this in a Visual Studio solution I also
 get that  _InterlockedCompareExchange64_<wbr>HLEAcquire is implicitly declared, and the same link error.</div><div><br></div><div>Any advice on something I am doing wrong or ways to fix this would be appreciated. For the curious, full branch of CPython is <a href="https://github.com/ethanhs/cpython/tree/clang-cl" target="_blank">https://github.com/ethanhs/<wbr>cpython/tree/clang-cl</a> . The usage of these intrinsics is in pyatomic.h.</div><div><br></div><div>Thanks so much!</div>

<br></div>