<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:0cm;
        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.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It works well enough for the 3.8 release. It marks the test unsupported for all supported targets if any of them is mips64. This means it will incorrectly mark mips (32-bit)
 unsupported as well but this is ok because the whole of msan is unsupported for mips (32-bit) at the moment.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I'll commit the '</span>UNSUPPORTED:mips64-supported-target' to the branch since that seems like the obvious thing to do and is a safer bet than merging this and D17045 this
 late in the release process.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alexey Samsonov [mailto:vonosmas@gmail.com]
<br>
<b>Sent:</b> 10 February 2016 01:01<br>
<b>To:</b> Daniel Sanders<br>
<b>Cc:</b> llvm-commits@lists.llvm.org; Hans Wennborg<br>
<b>Subject:</b> Re: [compiler-rt] r260230 - [msan] Run the tests for each supported arch and suffix each one to distinguish them.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">I'm curious if you can use a simpler workaround to disable this test in the release branch: will adding<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">UNSUPPORTED:mips64-supported-target<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">work there?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">(I agree that <a href="http://reviews.llvm.org/D17045">http://reviews.llvm.org/D17045</a> is cleaner fix).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Feb 9, 2016 at 3:15 PM, Daniel Sanders <<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
Is it ok to merge this to the 3.8 release? It turns out I need part of it (specifically the ${arch} variable from the loop) to fix the hanging test on our big-endian target (see
<a href="http://reviews.llvm.org/D17045" target="_blank">http://reviews.llvm.org/D17045</a>).<br>
<br>
________________________________________<br>
From: llvm-commits [<a href="mailto:llvm-commits-bounces@lists.llvm.org">llvm-commits-bounces@lists.llvm.org</a>] on behalf of Daniel Sanders via llvm-commits [<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>]<br>
Sent: 09 February 2016 16:18<br>
To: <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
Subject: [compiler-rt] r260230 - [msan] Run the tests for each supported arch and suffix each one to distinguish them.<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
Author: dsanders<br>
Date: Tue Feb  9 10:18:15 2016<br>
New Revision: 260230<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260230&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=260230&view=rev</a><br>
Log:<br>
[msan] Run the tests for each supported arch and suffix each one to distinguish them.<br>
<br>
Summary:<br>
Previously, the tests only ran for the 64-bit equivalent of the default target<br>
(see -m64).<br>
Given the supported architecture list only contains 64-bit targets, this happens<br>
to work out the same as the supported targets in most cases but may matter for<br>
X86_64/X86_64h on Darwin.<br>
<br>
For other targets, the practical effect is that the test names contain the<br>
architecture. This resolves some confusion when msan tests fail since their<br>
name no longer implies that they are trying to test the default target.<br>
<br>
Reviewers: samsonov<br>
<br>
Subscribers: tberghammer, danalbert, srhines, llvm-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D16855" target="_blank">http://reviews.llvm.org/D16855</a><br>
<br>
Modified:<br>
    compiler-rt/trunk/test/msan/CMakeLists.txt<br>
    compiler-rt/trunk/test/msan/lit.cfg<br>
    compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
<br>
Modified: compiler-rt/trunk/test/msan/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/CMakeLists.txt (original)<br>
+++ compiler-rt/trunk/test/msan/CMakeLists.txt Tue Feb  9 10:18:15 2016<br>
@@ -1,8 +1,32 @@<br>
 set(MSAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})<br>
<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}/lit.site.cfg)<br>
+set(MSAN_TESTSUITES)<br>
+<br>
+set(MSAN_TEST_ARCH ${MSAN_SUPPORTED_ARCH})<br>
+if(APPLE)<br>
+  darwin_filter_host_archs(MSAN_SUPPORTED_ARCH MSAN_TEST_ARCH)<br>
+endif()<br>
+<br>
+foreach(arch ${MSAN_TEST_ARCH})<br>
+  string(TOLOWER "-${arch}" MSAN_TEST_CONFIG_SUFFIX)<br>
+  if(ANDROID OR ${arch} MATCHES "arm|aarch64")<br>
+    # This is only true if we are cross-compiling.<br>
+    # Build all tests with host compiler and use host tools.<br>
+    set(MSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})<br>
+    set(MSAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS})<br>
+  else()<br>
+    get_target_flags_for_arch(${arch} MSAN_TEST_TARGET_CFLAGS)<br>
+    string(REPLACE ";" " " MSAN_TEST_TARGET_CFLAGS "${MSAN_TEST_TARGET_CFLAGS}")<br>
+  endif()<br>
+<br>
+  string(TOUPPER ${arch} ARCH_UPPER_CASE)<br>
+  set(CONFIG_NAME ${ARCH_UPPER_CASE}Config)<br>
+<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}/${CONFIG_NAME}/lit.site.cfg)<br>
+  list(APPEND MSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})<br>
+endforeach()<br>
<br>
 set(MSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})<br>
 if(NOT COMPILER_RT_STANDALONE_BUILD)<br>
@@ -17,7 +41,7 @@ if(COMPILER_RT_INCLUDE_TESTS AND COMPILE<br>
 endif()<br>
<br>
 add_lit_testsuite(check-msan "Running the MemorySanitizer tests"<br>
-  ${CMAKE_CURRENT_BINARY_DIR}<br>
+  ${MSAN_TESTSUITES}<br>
   DEPENDS ${MSAN_TEST_DEPS}<br>
   )<br>
 set_target_properties(check-msan PROPERTIES FOLDER "MSan tests")<br>
<br>
Modified: compiler-rt/trunk/test/msan/lit.cfg<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/lit.cfg (original)<br>
+++ compiler-rt/trunk/test/msan/lit.cfg Tue Feb  9 10:18:15 2016<br>
@@ -3,17 +3,18 @@<br>
 import os<br>
<br>
 # Setup config name.<br>
-<a href="http://config.name" target="_blank">config.name</a> = 'MemorySanitizer'<br>
+<a href="http://config.name" target="_blank">config.name</a> = 'MemorySanitizer' + config.name_suffix<br>
<br>
 # Setup source root.<br>
 config.test_source_root = os.path.dirname(__file__)<br>
<br>
 # Setup default compiler flags used with -fsanitize=memory option.<br>
-clang_msan_cflags = ["-fsanitize=memory",<br>
-                     "-mno-omit-leaf-frame-pointer",<br>
-                     "-fno-omit-frame-pointer",<br>
-                     "-fno-optimize-sibling-calls",<br>
-                     "-m64"] + config.debug_info_flags<br>
+clang_msan_cflags = (["-fsanitize=memory",<br>
+                      "-mno-omit-leaf-frame-pointer",<br>
+                      "-fno-omit-frame-pointer",<br>
+                      "-fno-optimize-sibling-calls"] +<br>
+                      [config.target_cflags] +<br>
+                      config.debug_info_flags)<br>
 # Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.<br>
 if config.host_os == 'FreeBSD':<br>
   clang_msan_cflags += ["-lexecinfo"]<br>
<br>
Modified: compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.site.cfg.in?rev=260230&r1=260229&r2=260230&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.site.cfg.in?rev=260230&r1=260229&r2=260230&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> (original)<br>
+++ compiler-rt/trunk/test/msan/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> Tue Feb  9 10:18:15 2016<br>
@@ -1,5 +1,11 @@<br>
+## Autogenerated by LLVM/Clang configuration.<br>
+# Do not edit!<br>
+<br>
 # Load common config for all compiler-rt lit tests.<br>
 lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")<br>
<br>
+# Tool-specific config options.<br>
+config.name_suffix = "@MSAN_TEST_CONFIG_SUFFIX@"<br>
+config.target_cflags = "@MSAN_TEST_TARGET_CFLAGS@"<br>
 # Load tool-specific config that would do the real work.<br>
 lit_config.load_config(config, "@MSAN_LIT_SOURCE_DIR@/lit.cfg")<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Alexey Samsonov<br>
<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>