Skip to content

Commit

Permalink
add compile flag /bigobj for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquetc committed Aug 1, 2023
1 parent 71cd760 commit ffb3b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cxx-qt-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
3 changes: 3 additions & 0 deletions crates/cxx-qt-lib/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ffb3b64

Please sign in to comment.