llvm.org GIT mirror llvm / 442c61d
MCJIT: ensure that cygwin is identified properly Cygwin is now a proper environment rather than an OS. This updates the MCJIT tests to avoid execution on Cygwin. This fixes native cygwin tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205266 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 6 years ago
3 changed file(s) with 12 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
134134 // The operating systems below are known to be sufficiently incompatible
135135 // that they will fail the MCJIT C API tests.
136136 UnsupportedOSs.push_back(Triple::Cygwin);
137
138 UnsupportedEnvironments.push_back(Triple::Cygnus);
137139 }
138140
139141 virtual void SetUp() {
7070 /// Returns true if the host OS is known to support MCJIT
7171 bool OSSupportsMCJIT() {
7272 Triple Host(HostTriple);
73
74 if (std::find(UnsupportedEnvironments.begin(), UnsupportedEnvironments.end(),
75 Host.getEnvironment()) != UnsupportedEnvironments.end())
76 return false;
77
7378 if (std::find(UnsupportedOSs.begin(), UnsupportedOSs.end(), Host.getOS())
74 == UnsupportedOSs.end()) {
79 == UnsupportedOSs.end())
7580 return true;
76 }
81
7782 return false;
7883 }
7984
8287 SmallVector HasSubArchs;
8388 SmallVector SupportedSubArchs; // We need to own the memory
8489 SmallVector UnsupportedOSs;
90 SmallVector UnsupportedEnvironments;
8591 };
8692
8793 } // namespace llvm
303303 // should be kept in sync.
304304 UnsupportedOSs.push_back(Triple::Cygwin);
305305 UnsupportedOSs.push_back(Triple::Darwin);
306
307 UnsupportedEnvironments.push_back(Triple::Cygnus);
306308 }
307309
308310 void createJIT(Module *M) {