<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’ll add a patch that queries llvm-config for targets-built and adds that as a prereq for building the arch.  Sound good?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-Greg<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Timur Iskhodzhanov [mailto:timurrrr@google.com] <br><b>Sent:</b> Thursday, May 29, 2014 1:56 PM<br><b>To:</b> Greg Fitzgerald<br><b>Cc:</b> llvm-commits; Reid Kleckner; Alexey Samsonov<br><b>Subject:</b> RE: [compiler-rt] r209835 - light up sanitizers for ARM<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p>See <a href="https://code.google.com/p/address-sanitizer/source/browse/trunk/build/scripts/slave/buildbot_standard.bat">https://code.google.com/p/address-sanitizer/source/browse/trunk/build/scripts/slave/buildbot_standard.bat</a><o:p></o:p></p><div><p class=MsoNormal>30 мая 2014 г. 0:47 пользователь "Greg Fitzgerald" <<a href="mailto:gregf@codeaurora.org">gregf@codeaurora.org</a>> написал:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Can you please provide steps to reproduce the error?  What are you passing to CMAKE_C_COMPILER?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Greg</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Timur Iskhodzhanov [mailto:<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>] <br><b>Sent:</b> Thursday, May 29, 2014 1:25 PM<br><b>To:</b> Greg Fitzgerald<br><b>Cc:</b> llvm-commits; Alexey Samsonov; Reid Kleckner<br><b>Subject:</b> Re: [compiler-rt] r209835 - light up sanitizers for ARM</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>This has broken "check-asan" on my Windows bot which targets X86 only:<br><span style='font-size:13.5pt;font-family:"Courier New";color:black'><...>projects/compiler-rt/lib/asan/tests/asan_asm_test.cc</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:13.5pt;font-family:"Courier New";color:black'>error: unknown target CPU 'armv7-a'</span><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>you should probably add "REQUIRES"?<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2014-05-29 23:01 GMT+04:00 Greg Fitzgerald <<a href="mailto:gregf@codeaurora.org" target="_blank">gregf@codeaurora.org</a>>:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Author: garious<br>Date: Thu May 29 14:01:32 2014<br>New Revision: 209835<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=209835&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=209835&view=rev</a><br>Log:<br>light up sanitizers for ARM<br><br>You can expect the sanitizers to be built under any of the following conditions:<br><br>1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM<br>2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target)<br>3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot<br><br>Differential Revision: <a href="http://reviews.llvm.org/D3794" target="_blank">http://reviews.llvm.org/D3794</a><br><br>Modified:<br>    compiler-rt/trunk/CMakeLists.txt<br>    compiler-rt/trunk/lib/lsan/CMakeLists.txt<br>    compiler-rt/trunk/test/asan/CMakeLists.txt<br>    compiler-rt/trunk/test/ubsan/CMakeLists.txt<br><br>Modified: compiler-rt/trunk/CMakeLists.txt<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/CMakeLists.txt (original)<br>+++ compiler-rt/trunk/CMakeLists.txt Thu May 29 14:01:32 2014<br>@@ -215,9 +215,9 @@ else()<br>     test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})<br>   elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")<br>     test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})<br>-  elseif("${LLVM_NATIVE_ARCH}" STREQUAL "ARM")<br>-    test_target_arch(arm "")<br>   endif()<br>+  test_target_arch(arm "-march=armv7-a")<br>+  test_target_arch(aarch64 "-march=armv8-a")<br> endif()<br><br> # We support running instrumented tests when we're not cross compiling<br>@@ -347,14 +347,14 @@ endif()<br> # Architectures supported by Sanitizer runtimes. Specific sanitizers may<br> # support only subset of these (e.g. TSan works on x86_64 only).<br> filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH<br>-  x86_64 i386 powerpc64 arm)<br>-filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 powerpc64)<br>+  x86_64 i386 powerpc64 arm aarch64)<br>+filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 powerpc64 arm)<br> filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64)<br> filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)<br> filter_available_targets(MSAN_SUPPORTED_ARCH x86_64)<br>-filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm)<br>+filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm aarch64)<br> filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)<br>-filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386)<br>+filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 arm aarch64)<br><br> add_subdirectory(include)<br><br><br>Modified: compiler-rt/trunk/lib/lsan/CMakeLists.txt<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/lib/lsan/CMakeLists.txt (original)<br>+++ compiler-rt/trunk/lib/lsan/CMakeLists.txt Thu May 29 14:01:32 2014<br>@@ -19,7 +19,7 @@ set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_<br> # The common files need to build on every arch supported by ASan.<br> # (Even if they build into dummy object files.)<br> filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH<br>-  x86_64 i386 powerpc64 arm)<br>+  x86_64 i386 powerpc64 arm aarch64)<br><br> add_custom_target(lsan)<br><br><br>Modified: compiler-rt/trunk/test/asan/CMakeLists.txt<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)<br>+++ compiler-rt/trunk/test/asan/CMakeLists.txt Thu May 29 14:01:32 2014<br>@@ -34,6 +34,21 @@ if(CAN_TARGET_arm)<br>   list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/ARMLinuxConfig)<br> endif()<br><br>+if(CAN_TARGET_aarch64)<br>+  # This is only true if we are cross-compiling.<br>+  # Build all tests with host compiler and use host tools.<br>+  set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})<br>+  set(ASAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})<br>+  set(ASAN_TEST_CONFIG_SUFFIX "-aarch64-linux")<br>+  set(ASAN_TEST_BITS "64")<br>+  set(ASAN_TEST_DYNAMIC False)<br>+  configure_lit_site_cfg(<br>+    ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>+    ${CMAKE_CURRENT_BINARY_DIR}/AArch64LinuxConfig/lit.site.cfg<br>+    )<br>+  list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/AArch64LinuxConfig)<br>+endif()<br>+<br> if(CAN_TARGET_x86_64 OR CAN_TARGET_powerpc64)<br>   set(ASAN_TEST_CONFIG_SUFFIX "64")<br>   set(ASAN_TEST_BITS "64")<br><br>Modified: compiler-rt/trunk/test/ubsan/CMakeLists.txt<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/CMakeLists.txt?rev=209835&r1=209834&r2=209835&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/test/ubsan/CMakeLists.txt (original)<br>+++ compiler-rt/trunk/test/ubsan/CMakeLists.txt Thu May 29 14:01:32 2014<br>@@ -4,11 +4,15 @@ set(UBSAN_LIT_TEST_MODE "Standalone")<br> configure_lit_site_cfg(<br>   ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>   ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig/lit.site.cfg)<br>+set(UBSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig)<br><br>-set(UBSAN_LIT_TEST_MODE "AddressSanitizer")<br>-configure_lit_site_cfg(<br>-  ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>-  ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)<br>+if(ASAN_SUPPORTED_ARCH)<br>+  set(UBSAN_LIT_TEST_MODE "AddressSanitizer")<br>+  configure_lit_site_cfg(<br>+    ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>+    ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)<br>+  list(APPEND UBSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig)<br>+endif()<br><br> set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})<br> if(NOT COMPILER_RT_STANDALONE_BUILD)<br>@@ -16,7 +20,6 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)<br> endif()<br><br> add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests"<br>-  ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig<br>-  ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig<br>+  ${UBSAN_TESTSUITES}<br>   DEPENDS ${UBSAN_TEST_DEPS})<br> set_target_properties(check-ubsan PROPERTIES FOLDER "UBSan unittests")<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div></div></div></body></html>