about summary refs log tree commit diff
path: root/src/build_helper/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/build_helper/lib.rs')
-rw-r--r--src/build_helper/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
index f035a711918..bb94fb2b755 100644
--- a/src/build_helper/lib.rs
+++ b/src/build_helper/lib.rs
@@ -21,6 +21,13 @@ macro_rules! t {
             Err(e) => panic!("{} failed with {}", stringify!($e), e),
         }
     };
+    // it can show extra info in the second parameter
+    ($e:expr, $extra:expr) => {
+        match $e {
+            Ok(e) => e,
+            Err(e) => panic!("{} failed with {} ({:?})", stringify!($e), e, $extra),
+        }
+    };
 }
 
 // Because Cargo adds the compiler's dylib path to our library search path, llvm-config may