about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-28 16:36:14 +0000
committerbors <bors@rust-lang.org>2025-09-28 16:36:14 +0000
commitc8905eaa66e0c35a33626e974b9ce6955c739b5b (patch)
tree52dd4bdf4bb5cfeab181f05a308c3bbd6d1959da /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent8d72d3e1e96f58ca10059a6bb6e8aecba4a0e9cd (diff)
parent4eb6b8f43f37b612db58b9cd1682ee7256fb0c43 (diff)
downloadrust-c8905eaa66e0c35a33626e974b9ce6955c739b5b.tar.gz
rust-c8905eaa66e0c35a33626e974b9ce6955c739b5b.zip
Auto merge of #147128 - matthiaskrgr:rollup-mqey4c4, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#140482 (std::net: update tcp deferaccept delay type to Duration.)
 - rust-lang/rust#141469 (Allow `&raw [mut | const]` for union field in safe code)
 - rust-lang/rust#144197 (TypeTree support in autodiff)
 - rust-lang/rust#146675 (Allow shared access to `Exclusive<T>` when `T: Sync`)
 - rust-lang/rust#147113 (Reland "Add LSX accelerated implementation for source file analysis")
 - rust-lang/rust#147120 (Fix --extra-checks=spellcheck to prevent cargo install every time)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 2bfe3f7040c..4a778125918 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1812,3 +1812,15 @@ extern "C" void LLVMRustSetNoSanitizeHWAddress(LLVMValueRef Global) {
   MD.NoHWAddress = true;
   GV.setSanitizerMetadata(MD);
 }
+
+#ifdef ENZYME
+extern "C" {
+extern llvm::cl::opt<unsigned> EnzymeMaxTypeDepth;
+}
+
+extern "C" size_t LLVMRustEnzymeGetMaxTypeDepth() { return EnzymeMaxTypeDepth; }
+#else
+extern "C" size_t LLVMRustEnzymeGetMaxTypeDepth() {
+  return 6; // Default fallback depth
+}
+#endif