Skip to content

Only use whole-archive on the -initalizers library that contains QML plugins/resources #963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

LeonMatthesKDAB
Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB commented May 23, 2024

Closes #958

Previously, we linked the entire staticlib generated by the Rust
compiler into our CMake target.
This was part of what caused the recent issues in CI (see KDAB#958).
Cargo already only linked the plugin&resources library as whole-archive,
which is where where it is needed.
Now we simply export the initializers library into the CXXQT_EXPORT_DIR,
so we can only link the initializers with whole-archive.
This is a lot cleaner and should lead to fewer linker failures.

Closes KDAB#958
@LeonMatthesKDAB
Copy link
Collaborator Author

LeonMatthesKDAB commented May 23, 2024

Okay, new problem, now the cxx-qt-lib initializers aren't being included, as they're just part of the main binary linked by cargo, not the -initializers library...

@ahayzen-kdab
Copy link
Collaborator

Separately i'll explore having an init() method

@ahayzen-kdab
Copy link
Collaborator

Separately i'll explore having an init() method

Working build is here #964

@LeonMatthesKDAB
Copy link
Collaborator Author

Closing in favor of #978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSVC CI doesn't compile with Rust 1.78.0
2 participants