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

convert all programs to rust programs calling mains from cpp lib #47771

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

jkarneges
Copy link
Member

@jkarneges jkarneges commented Nov 7, 2023

Notably this changes the build order. Previously, the Rust code was built first (lib and programs) followed by all the C++ code which could use the Rust lib as needed. With this change, the C++ lib is built first, followed by the Rust code which uses the C++ lib as needed, followed by the C++ tests which use both the C++ lib and Rust lib as needed.

@jkarneges jkarneges force-pushed the jkarneges/rust-bins branch from 3cfa8a4 to 5ef1971 Compare November 7, 2023 19:04
@jkarneges jkarneges force-pushed the jkarneges/rust-bins branch from 5ef1971 to da4ca41 Compare November 7, 2023 20:36
pushpin_bin.commands = cp -a $$target_dir/pushpin $$root_dir/pushpin
m2adapter_bin.target = $$bin_dir/m2adapter
m2adapter_bin.depends = m2adapter_build
m2adapter_bin.commands = mkdir -p $$bin_dir && cp -a $$target_dir/m2adapter $$bin_dir/m2adapter
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need mkdir -p $$bin_dir cmd to be repeated for these bins?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sort of. The bin dir isn't part of the repo and is created on demand. Since it is possible for make to run individual targets or to run these targets in different orders, they all try to make the bin dir.

Copy link
Contributor

Choose a reason for hiding this comment

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

in that case do we need to add the mkdir to runner_legacy_bin.commands & runner_bin.commands ?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, the runner(s) go in the root dir not the bin dir, so they don't need it.

@jkarneges jkarneges merged commit 57c4a34 into main Nov 7, 2023
1 check passed
@jkarneges jkarneges deleted the jkarneges/rust-bins branch November 7, 2023 22:32
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.

2 participants