diff --git a/wrap/cmake/PybindWrap.cmake b/wrap/cmake/PybindWrap.cmake
index 2008bf2..ec00613 100644
--- a/wrap/cmake/PybindWrap.cmake
+++ b/wrap/cmake/PybindWrap.cmake
@@ -104,12 +104,17 @@
     VERBATIM)
 
     add_custom_target(pybind_wrap_${module_name} DEPENDS ${cpp_files})
 
   pybind11_add_module(${target} "${cpp_files}")
 
+  # Build workaround to allow this to build on 32-bit arches. This is needed in
+  # addition to the flag in debian/rules.
+  # https://lists.debian.org/debian-devel/2023/08/msg00156.html
+  target_compile_options(${target} PRIVATE -O0 -g0)
+
   if(APPLE)
     # `type_info` objects will become "weak private external" if the templated
     # class is initialized implicitly even if we explicitly export them with
     # `WRAP_EXPORT`. If that happens, the `type_info` for the same templated
     # class will diverge between shared libraries, causing `dynamic_cast` to
     # fail. This is mitigated by telling Clang to mimic the MSVC behavior. See
