Skip to content

Commit 8e6522b

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 9288a59 commit 8e6522b

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
@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- `QDateTime` API to use `current_date_time` rather than `current_date`
2020
- Always call `qt_build_utils::setup_linker()` in `CxxQtBuilder` and remove the proxy method
2121

22+
### Fixed
23+
24+
- Builds failing due to `link modifiers combination +bundle,+whole-archive is unstable when generating rlibs`
25+
2226
## [0.5.1](https://github.com/KDAB/cxx-qt/compare/v0.5.0...v0.5.1) - 2023-03-27
2327

2428
### Fixed

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

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

0 commit comments

Comments
 (0)