Skip to content
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

rust: Add linkdirs of indirect Rust dependencies to the target's link… #11719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdroege
Copy link
Contributor

@sdroege sdroege commented Apr 23, 2023

…dirs

rustc requires all the linkdirs to indirect dependencies to be able to find them, but doesn't require them to be provided as --extern in addition. The latter would also easily lead to name conflicts.

Fixes #11694

@sdroege sdroege requested a review from jpakkane as a code owner April 23, 2023 17:48
@sdroege
Copy link
Contributor Author

sdroege commented Apr 23, 2023

CC @dcbaker @nirbheek

…dirs

rustc requires all the linkdirs to indirect dependencies to be able to
find them, but doesn't require them to be provided as `--extern` in
addition. The latter would also easily lead to name conflicts.

Fixes mesonbuild#11694
@sdroege sdroege force-pushed the rust-recursive-rlib-link-dirs branch from 04ce8c6 to 2d57132 Compare April 23, 2023 17:53
indirect_rust_deps += d.libraries
indirect_rust_deps += d.whole_libraries
indirect_rust_deps += indirect_dep.link_targets
indirect_rust_deps += indirect_dep.link_whole_targets
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not entirely sure if all of the above is actually correct, but it works.

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

Successfully merging this pull request may close these issues.

rust: rlib/dylib dependencies of dependencies only need -L added but not --extern
2 participants