<div dir="ltr">Hi Stephan,<div><br></div><div>#pragma intrinsic isn't implemented yet, this is <a href="http://llvm.org/PR19898">http://llvm.org/PR19898</a> . As a workaround, you can pass /FIIntrin.h in your compiler flags, then things should work.</div><div><br></div><div>Slides 83-88 of this deck give some advice such as this for using clang-cl in practice: <a href="https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.p">https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.p</a></div><div><br></div><div>Nico</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 8:46 AM, Stephan Bergmann via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm experimenting with building LibreOffice on Windows with the clang-cl wrapper (and that looks really promising nowadays; it looked much worse when I naively tried last time).  I'm using a recent Clang trunk build.<br>
<br>
After some trial and error, I get along quite well for a while with passing<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
C:/clang/build/Debug/bin/clang-cl.exe -fmsc-version=1700 -Qunused-arguments --target=x86_64-windows-mscv<br>
</blockquote>
<br>
as CC and CXX into LibreOffice's build system (which heavily expects the compiler to be MSVC on Windows, of course).<br>
<br>
However, one place that is causing trouble is code calling RtlSecureZeroMemory, which leads to referencing an unresolved external symbol __stosb during linking.  The definition of RtlSecureZeroMemory in winnt.h is using<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
#if defined(_M_AMD64)<br>
__stosb(...)<br>
</blockquote>
<br>
where __stosb is apparently an MSVC intrinsic, and I see an inline definition of it in the Clang installation's lib/clang/3.8.0/include/Intrin.h, but that include file is apparently not used when compiling the above code.<br>
<br>
When I manually #include <Intrin.h> into the LibreOffice source file that calls RtlSecureZeroMemory, compiling and linking succeeds, but I'm not sure that's the intended setup.  Am I missing something how to set up things so that Clang's Intrin.h gets picked up automatically (or is this the wrong approach to fix things anyway)?<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>