diff --git a/crates/cxx-qt-build/src/lib.rs b/crates/cxx-qt-build/src/lib.rs index 2add094d8..5ef9c38ce 100644 --- a/crates/cxx-qt-build/src/lib.rs +++ b/crates/cxx-qt-build/src/lib.rs @@ -497,8 +497,10 @@ impl CxxQtBuilder { builder.flag_if_supported("/std:c++17"); builder.flag_if_supported("/Zc:__cplusplus"); builder.flag_if_supported("/permissive-"); + builder.flag_if_supported("/bigobj"); // GCC + Clang builder.flag_if_supported("-std=c++17"); + // MinGW requires big-obj otherwise debug builds fail builder.flag_if_supported("-Wa,-mbig-obj"); // Enable Qt Gui in C++ if the feature is enabled #[cfg(feature = "qt_gui")] diff --git a/crates/cxx-qt-lib/build.rs b/crates/cxx-qt-lib/build.rs index 168bc3114..7bc9ec32b 100644 --- a/crates/cxx-qt-lib/build.rs +++ b/crates/cxx-qt-lib/build.rs @@ -268,8 +268,11 @@ fn main() { builder.flag_if_supported("/std:c++17"); builder.flag_if_supported("/Zc:__cplusplus"); builder.flag_if_supported("/permissive-"); + builder.flag_if_supported("/bigobj"); + // GCC + Clang builder.flag_if_supported("-std=c++17"); + // MinGW requires big-obj otherwise debug builds fail builder.flag_if_supported("-Wa,-mbig-obj"); builder.compile("cxx-qt-lib");