template: fix undefined references when linking with cargo
ClosedPublic

Authored by psbarra on Sep 15 2019, 1:35 PM.

Details

Reviewers
vandenoever
Summary

BUG: 411928

Explicity specify the Qt module dependencies in build.rs to satisfy the linker.

The parent existence check allows link dependencies to be specified by filename.
It's needed to work around https://github.com/rust-lang/rust/issues/36861

Test Plan

execute "cargo run" from the templates/qt_quick_cargo directory.

Diff Detail

Repository
R881 Rust Qt Binding Generator
Lint
Lint Skipped
Unit
Unit Tests Skipped
psbarra requested review of this revision.Sep 15 2019, 1:35 PM
psbarra created this revision.

Can you explain the reasoning for the patch?

vandenoever accepted this revision.Sep 16 2019, 3:20 PM

Ok, this looks good. Please push it.

This revision is now accepted and ready to land.Sep 16 2019, 3:20 PM

Thanks for the review. I don't have a KDE Developer account, would you be able to land the patch?

Actually, taking another look I think the better approach is to specify the library dependencies via module instead of link_lib. I'll see if I can figure out how to update the patch.

psbarra updated this revision to Diff 66354.Sep 18 2019, 3:58 AM
psbarra retitled this revision from template: resolve cargo linking issue to template: fix undefined references when linking with cargo.
psbarra edited the summary of this revision. (Show Details)
psbarra edited the test plan for this revision. (Show Details)

Specify Qt module dependencies instead of the library name.

psbarra closed this revision.Sep 20 2019, 4:44 PM

Thanks!