Hi, Thank you for catching this. I thought that the macros like __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?
I couldn't find out which macros to use to get the target arch, so I see 2 possible solutions : 1. Create a new test binary for these two small tests and specify explicitly the target. This seems overwhelming. 2. Simply remove those two test cases. This seems to be the simplest solution. Gábor On Fri, 1 Feb 2019, 17:23 David Green <david.gr...@arm.com wrote: > Hello > > 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. > > I went looking through the buildbots and I think this hexagon bot builds > that way: > http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22699 > > Got any good suggestions how to fix it? > > Thanks, > Dave > > > > > > Author: martong > Date: Thu Jan 24 07:42:20 2019 > New Revision: 352055 > > URL: http://llvm.org/viewvc/llvm-project?rev=352055&view=rev > Log: > Fix failing buildbots > > Related commit which caused the buildbots to fail: > rL352050 > > Modified: > cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp > > Modified: cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp?rev=352055&r1=352054&r2=352055&view=diff > > ============================================================================== > --- cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp (original) > +++ cfe/trunk/unittests/AST/StructuralEquivalenceTest.cpp Thu Jan 24 > 07:42:20 2019 > @@ -378,14 +378,17 @@ TEST_F(StructuralEquivalenceFunctionTest > EXPECT_TRUE(testStructuralMatch(t)); > } > > +// These calling conventions may not be available on certain platforms. > +#if defined(__x86_64__) && defined(__linux__) > TEST_F(StructuralEquivalenceFunctionTest, > FunctionsWithDifferentCallingConventions) { > auto t = makeNamedDecls( > - "__attribute__((fastcall)) void foo();", > + "__attribute__((preserve_all)) void foo();", > "__attribute__((ms_abi)) void foo();", > Lang_C); > EXPECT_FALSE(testStructuralMatch(t)); > } > +#endif > > TEST_F(StructuralEquivalenceFunctionTest, > FunctionsWithDifferentSavedRegsAttr) { > auto t = makeNamedDecls( > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits