<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Kostya,<div class=""><br class=""></div><div class="">Additionally, on one of the windows buildbots libfuzzer compilation fails due to __builtin_bswapX not available.</div><div class="">Would it be a good idea to #ifdef around that and do a manual slower implementation otherwise?</div><div class=""><br class=""></div><div class="">As for the thread_local replacement, I’ll look into that, seems easiest to only apply the replacement for older Apple machines.</div><div class="">I’m more surprised it worked in the first place, since IIRC C++11 standard does not allow redefining keywords. </div><div class=""><br class=""></div><div class="">George</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 21, 2017, at 11:22 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" class="">kcc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">yes, see it. thanks! </div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Apr 21, 2017 at 11:22 AM, Kuba Mracek <span dir="ltr" class=""><<a href="mailto:mracek@apple.com" target="_blank" class="">mracek@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class="">We've reverted the patch that tries to build libFuzzer by default.</div><div class=""><br class=""></div><div class="">We'll look into that.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Kuba</div></font></span><div class=""><div class="h5"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 21 Apr 2017, at 11:17, Kostya Serebryany via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="m_8529092780375290532Apple-interchange-newline"><div class=""><div dir="ltr" class="">Breaks on windows. <div class=""><pre style="font-family:'courier new',courier,monotype,monospace;font-size:inherit" class=""><span class="m_8529092780375290532gmail-stdout">In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\yvals.h:7:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xkeycheck.h(<wbr class="">250,5):  error: The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
   #error The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
    ^</span></pre><pre class=""><span class="m_8529092780375290532gmail-stdout"><font face="courier new, courier, monotype, monospace" size="3" class=""><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/10026/steps/build LLVMFuzzer/logs/stdio" target="_blank" class="">http://lab.llvm.org:8011/<wbr class="">builders/sanitizer-windows/<wbr class="">builds/10026/steps/build%<wbr class="">20LLVMFuzzer/logs/stdio</a><br class=""></font></span></pre><br class="">Why did the cmake check on windows decide to use the -D hack? <pre class=""><span class="m_8529092780375290532gmail-stdout"><font face="courier new, courier, monotype, monospace" size="3" class=""><br class=""></font></span></pre><pre class=""><span class="m_8529092780375290532gmail-stdout"><font face="courier new, courier, monotype, monospace" size="3" class=""><br class=""></font></span></pre></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Apr 21, 2017 at 10:39 AM, Kuba Mracek via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: kuba.brecka<br class="">
Date: Fri Apr 21 12:39:50 2017<br class="">
New Revision: 301007<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=301007&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-pr<wbr class="">oject?rev=301007&view=rev</a><br class="">
Log:<br class="">
[libFuzzer] Changing thread_local to __thread in libFuzzer<br class="">
<br class="">
Old Apple compilers do not support thread_local keyword. This patch adds -Dthread_local=__thread when the compiler doesn't support thread_local.<br class="">
<br class="">
Differential Revision: <a href="https://reviews.llvm.org/D32312" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D3231<wbr class="">2</a><br class="">
<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/lib/Fuzzer/CMakeLis<wbr class="">ts.txt<br class="">
<br class="">
Modified: llvm/trunk/lib/Fuzzer/CMakeLis<wbr class="">ts.txt<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/CMakeLists.txt?rev=301007&r1=301006&r2=301007&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-pr<wbr class="">oject/llvm/trunk/lib/Fuzzer/CM<wbr class="">akeLists.txt?rev=301007&r1=301<wbr class="">006&r2=301007&view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- llvm/trunk/lib/Fuzzer/CMakeLis<wbr class="">ts.txt (original)<br class="">
+++ llvm/trunk/lib/Fuzzer/CMakeLis<wbr class="">ts.txt Fri Apr 21 12:39:50 2017<br class="">
@@ -1,3 +1,16 @@<br class="">
+include(CheckCXXSourceCompile<wbr class="">s)<br class="">
+<br class="">
+CHECK_CXX_SOURCE_COMPILES("<br class="">
+    static thread_local int blah;<br class="">
+    int main() {<br class="">
+      return 0;<br class="">
+    }<br class="">
+    " HAS_THREAD_LOCAL)<br class="">
+<br class="">
+if( NOT HAS_THREAD_LOCAL )<br class="">
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dthread_local=__thread")<br class="">
+endif()<br class="">
+<br class="">
 set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS}")<br class="">
 # Disable the coverage and sanitizer instrumentation for the fuzzer itself.<br class="">
 set(CMAKE_CXX_FLAGS "${LIBFUZZER_FLAGS_BASE} -fno-sanitize-coverage=trace-p<wbr class="">c-guard,edge,trace-cmp,indirec<wbr class="">t-calls,8bit-counters -Werror")<br class="">
<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
______________________________<wbr class="">_________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>