--- ./caffe2/CMakeLists.txt_orig	2025-06-17 21:04:34.749078573 -0500
+++ ./caffe2/CMakeLists.txt	2025-06-17 21:04:52.329207800 -0500
@@ -1662,7 +1662,7 @@
 # That usually leads to missing symbol errors at run-time, so to avoid a situation like
 # this we have to preload those libs in a global namespace.
 if(BUILD_SHARED_LIBS)
-  add_library(torch_global_deps SHARED ${TORCH_SRC_DIR}/csrc/empty.c)
+  add_library(torch_global_deps MODULE ${TORCH_SRC_DIR}/csrc/empty.c)
   if(HAVE_SOVERSION)
     set_target_properties(torch_global_deps PROPERTIES
         VERSION ${TORCH_VERSION} SOVERSION ${TORCH_SOVERSION})
