[cfe-commits] r141180 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp
Douglas Gregor
dgregor at apple.com
Wed Oct 5 07:58:47 PDT 2011
Author: dgregor
Date: Wed Oct 5 09:58:46 2011
New Revision: 141180
URL: http://llvm.org/viewvc/llvm-project?rev=141180&view=rev
Log:
Seriously ugly hack to try to get the Windows builders back online
Modified:
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=141180&r1=141179&r2=141180&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Oct 5 09:58:46 2011
@@ -880,10 +880,13 @@
if (getState() != LFS_Shared)
return;
+#if LLVM_ON_WIN32
+ unsigned long Interval = 1;
+#else
struct timespec Interval;
Interval.tv_sec = 0;
Interval.tv_nsec = 1000000;
-
+#endif
// Don't wait more than an hour for the file to appear.
const unsigned MaxSeconds = 3600;
do {
@@ -902,13 +905,23 @@
return;
// Exponentially increase the time we wait for the lock to be removed.
+#if LLVM_ON_WIN32
+ Interval *= 2;
+#else
Interval.tv_sec *= 2;
Interval.tv_nsec *= 2;
if (Interval.tv_nsec >= 1000000000) {
++Interval.tv_sec;
Interval.tv_nsec -= 1000000000;
}
- } while (Interval.tv_sec < MaxSeconds);
+#endif
+ } while (
+#if LLVM_ON_WIN32
+ Interval < MaxSeconds * 1000
+#else
+ Interval.tv_sec < MaxSeconds
+#endif
+ );
// Give up.
}
More information about the cfe-commits
mailing list