<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">Thank you for catching this. I thought that the macros like <span style="font-family:sans-serif">__x86_64__ are defined for the target. I just don't understand: If they are defined for the host, that would mean we can't cross compile on the same host for different targets, wouldn't it? </span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">I couldn't find out which macros to use to get the target arch, so I see 2 possible solutions :</span></div><div dir="auto">1. Create a new test binary for these two small tests and specify explicitly the target. This seems overwhelming. </div><div dir="auto">2. Simply remove those two test cases. This seems to be the simplest solution. </div><div dir="auto"><br></div><div dir="auto">Gábor </div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Fri, 1 Feb 2019, 17:23 David Green <<a href="mailto:David.Green@arm.com">David.Green@arm.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
Sorry for the late reply. I'm not sure this ifdef is quite correct. It will be testing the _host_ architecture, presuming the default target is the same. If they are different (for example if the default target is aarch64 on an x86 machine), the test will presumably still fail.<br>
<br>
I went looking through the buildbots and I think this hexagon bot builds that way:<br>
<a href="http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22699" rel="noreferrer noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22699</a><br>
<br>
Got any good suggestions how to fix it?<br>
<br>
Thanks,<br>
Dave<br>
<br>
<br>
<br>
<br>
<br>
Author: martong<br>
Date: Thu Jan 24 07:42:20 2019<br>
New Revision: 352055<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=352055&view=rev" rel="noreferrer noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=352055&view=rev</a><br>
Log:<br>
Fix failing buildbots<br>
<br>
Related commit which caused the buildbots to fail:<br>
rL352050<br>
<br>
Modified:<br>
    cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp<br>
<br>
Modified: cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp<br>
URL:  <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp?rev=352055&r1=352054&r2=352055&view=diff" rel="noreferrer noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp?rev=352055&r1=352054&r2=352055&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp (original)<br>
+++ cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp Thu Jan 24 07:42:20 2019<br>
@@ -378,14 +378,17 @@ TEST_F(StructuralEquivalenceFunctionTest<br>
   EXPECT_TRUE(testStructuralMatch(t));<br>
 }<br>
 <br>
+// These calling conventions may not be available on certain platforms.<br>
+#if defined(__x86_64__) && defined(__linux__)<br>
 TEST_F(StructuralEquivalenceFunctionTest,<br>
     FunctionsWithDifferentCallingConventions) {<br>
   auto t = makeNamedDecls(<br>
-      "__attribute__((fastcall)) void foo();",<br>
+      "__attribute__((preserve_all)) void foo();",<br>
       "__attribute__((ms_abi))   void foo();",<br>
       Lang_C);<br>
   EXPECT_FALSE(testStructuralMatch(t));<br>
 }<br>
+#endif<br>
 <br>
 TEST_F(StructuralEquivalenceFunctionTest, FunctionsWithDifferentSavedRegsAttr) {<br>
   auto t = makeNamedDecls(<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" rel="noreferrer">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
    </blockquote></div></div>