Index: third_party/re2/patches/remove-valgrind-code.patch |
diff --git a/third_party/re2/patches/remove-valgrind-code.patch b/third_party/re2/patches/remove-valgrind-code.patch |
new file mode 100644 |
index 0000000000000000000000000000000000000000..20fea48156eb455a44a2b4bd9bb7b6847ead38f0 |
--- /dev/null |
+++ b/third_party/re2/patches/remove-valgrind-code.patch |
@@ -0,0 +1,50 @@ |
+diff -r ceab86d470c1 re2/dfa.cc |
+--- a/re2/dfa.cc Tue Jul 03 16:43:11 2012 +0200 |
++++ b/re2/dfa.cc Tue Jul 03 17:03:00 2012 +0200 |
+@@ -27,6 +27,8 @@ |
+ #include "util/flags.h" |
+ #include "util/sparse_set.h" |
+ |
++#define NO_THREAD_SAFETY_ANALYSIS |
++ |
+ DEFINE_bool(re2_dfa_bail_when_slow, true, |
+ "Whether the RE2 DFA should bail out early " |
+ "if the NFA would be faster (for testing)."); |
+diff -r ceab86d470c1 util/util.h |
+--- a/util/util.h Tue Jul 03 16:43:11 2012 +0200 |
++++ b/util/util.h Tue Jul 03 17:03:00 2012 +0200 |
+@@ -28,6 +28,8 @@ |
+ #include <utility> |
+ #include <set> |
+ |
++#include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
++ |
+ // Use std names. |
+ using std::set; |
+ using std::pair; |
+@@ -86,16 +88,6 @@ |
+ |
+ #define arraysize(array) (sizeof(array)/sizeof((array)[0])) |
+ |
+-// Fake lock annotations. For real ones, see |
+-// http://code.google.com/p/data-race-test/ |
+-#define ANNOTATE_PUBLISH_MEMORY_RANGE(a, b) |
+-#define ANNOTATE_IGNORE_WRITES_BEGIN() |
+-#define ANNOTATE_IGNORE_WRITES_END() |
+-#define ANNOTATE_BENIGN_RACE(a, b) |
+-#define NO_THREAD_SAFETY_ANALYSIS |
+-#define ANNOTATE_HAPPENS_BEFORE(x) |
+-#define ANNOTATE_HAPPENS_AFTER(x) |
+- |
+ class StringPiece; |
+ |
+ string CEscape(const StringPiece& src); |
+@@ -121,8 +113,6 @@ |
+ return ((uint64)x << 32) | y; |
+ } |
+ |
+-int RunningOnValgrind(); |
+- |
+ } // namespace re2 |
+ |
+ #include "util/arena.h" |