Skip to content

link .o files #605

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

Merged
merged 14 commits into from
Jul 12, 2023
Merged

link .o files #605

merged 14 commits into from
Jul 12, 2023

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Jul 12, 2023

#600 + some fixes to get #513 to link

@Be-ing Be-ing changed the title Object files link .o files Jul 12, 2023
jimmyvanhest and others added 14 commits July 12, 2023 12:10
Instead look for the files by iterating over the directory entries.
when static linking only one of them is allowed to to add object files else duplicate symbol errors will be produced.
…link_libraries and are hard to remove. instead instruct this function to not include these object files.
Unfortunately, there is no way to get linking to work in every case
without conditional compilation. This feature needs to be enabled
for bin crates or when running `cargo test` for library crates. The
feature must not be enabled when builing a staticlib then linking
it with CMake because CMake will also link the .o files, which
makes linking fail with duplicate symbol errors.
Whether to link the .o files is now controlled by a Cargo option,
not the calling code.
Copy link
Collaborator

@ahayzen-kdab ahayzen-kdab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :-)

@ahayzen-kdab ahayzen-kdab enabled auto-merge (rebase) July 12, 2023 17:45
@ahayzen-kdab ahayzen-kdab merged commit 57453a7 into KDAB:main Jul 12, 2023
@Be-ing Be-ing mentioned this pull request Jul 12, 2023
@Be-ing Be-ing deleted the object_files branch July 12, 2023 17:52
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.

3 participants