Skip to content

Commit

Permalink
cxx-qt-build: unset bundle for link modifiers
Browse files Browse the repository at this point in the history
Otherwise the build fails with the following error with rustc 1.69

link modifiers combination `+bundle,+whole-archive` is unstable when generating rlibs

Closes #519
  • Loading branch information
ahayzen-kdab committed Apr 27, 2023
1 parent 9288a59 commit 8e6522b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `QDateTime` API to use `current_date_time` rather than `current_date`
- Always call `qt_build_utils::setup_linker()` in `CxxQtBuilder` and remove the proxy method

### Fixed

- Builds failing due to `link modifiers combination +bundle,+whole-archive is unstable when generating rlibs`

## [0.5.1](https://github.com/KDAB/cxx-qt/compare/v0.5.0...v0.5.1) - 2023-03-27

### Fixed
Expand Down
4 changes: 4 additions & 0 deletions crates/cxx-qt-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ impl CxxQtBuilder {
// to avoid bloating the binary.
let mut cc_builder_whole_archive = cc::Build::new();
cc_builder_whole_archive.link_lib_modifier("+whole-archive");
// We need to set -bundle otherwise the compiler fails with
// link modifiers combination `+bundle,+whole-archive` is unstable when generating rlibs
// https://github.com/rust-lang/rust/issues/108081
cc_builder_whole_archive.link_lib_modifier("-bundle");
for builder in [&mut self.cc_builder, &mut cc_builder_whole_archive] {
builder.cpp(true);
// MSVC
Expand Down

0 comments on commit 8e6522b

Please sign in to comment.