about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-06-18 19:52:05 -0700
committerBrian Anderson <banderson@mozilla.com>2013-06-18 19:52:05 -0700
commit7f55fc33f08a7ec5df0d06b4b0543bc864e60640 (patch)
treed8b84b09faa330265850b263701d57e8dc775f9e /src/rt/rust_builtin.cpp
parent04b1dbabf567f530c20e44d5e97967dae3aabd17 (diff)
downloadrust-7f55fc33f08a7ec5df0d06b4b0543bc864e60640.tar.gz
rust-7f55fc33f08a7ec5df0d06b4b0543bc864e60640.zip
std: Work around some failing 'run' tests when valgrinding. #7224
Under valgrind on 64->32 cross compiles the dynamic linker is emitting
some error messages on stderr, which interferes with the tests that
are checking stderr.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 5e7357c9b7b..3bd5e09e007 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -17,6 +17,7 @@
 #include "sync/timer.h"
 #include "sync/rust_thread.h"
 #include "rust_abi.h"
+#include "vg/valgrind.h"
 
 #include <time.h>
 
@@ -930,6 +931,11 @@ rust_begin_unwind(uintptr_t token) {
 #endif
 }
 
+extern "C" CDECL uintptr_t
+rust_running_on_valgrind() {
+    return RUNNING_ON_VALGRIND;
+}
+
 //
 // Local Variables:
 // mode: C++