Skip to content

Commit ebf5b87

Browse files
committed
cxx-qt-build: unset bundle for link modifiers
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
1 parent baabea7 commit ebf5b87

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
## [Unreleased](https://github.com/KDAB/cxx-qt/compare/v0.5.1...HEAD)
1616

17+
### Fixed
18+
19+
- Builds failing due to `link modifiers combination +bundle,+whole-archive is unstable when generating rlibs`
20+
1721
## [0.5.1](https://github.com/KDAB/cxx-qt/compare/v0.5.0...v0.5.1) - 2023-03-30
1822

1923
### Fixed

crates/cxx-qt-build/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ impl CxxQtBuilder {
411411
// to avoid bloating the binary.
412412
let mut cc_builder_whole_archive = cc::Build::new();
413413
cc_builder_whole_archive.link_lib_modifier("+whole-archive");
414+
// We need to set -bundle otherwise the compiler fails with
415+
// link modifiers combination `+bundle,+whole-archive` is unstable when generating rlibs
416+
// https://github.com/rust-lang/rust/issues/108081
417+
cc_builder_whole_archive.link_lib_modifier("-bundle");
414418
for builder in [&mut self.cc_builder, &mut cc_builder_whole_archive] {
415419
builder.cpp(true);
416420
// MSVC

0 commit comments

Comments
 (0)