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 KDAB#519
  • Loading branch information
ahayzen-kdab committed Apr 27, 2023
1 parent baabea7 commit ff97c17
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 @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

### 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-30

### 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 @@ -411,6 +411,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 ff97c17

Please sign in to comment.