-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use different target-dir for each package or enable workspace target-dir #309
Comments
Are you perhaps setting different rustflags for each package (e.g. via If you are not setting any rustflags I would need some more information to be able to reproduce your problem. At work we also use a large workspace and are not experiencing this problem with corrosion. |
Thanks for reply! I don't have a minimum reproducible repository yet, the repository I'm working on is this branch https://github.com/chewing/libchewing/tree/rust I'm not setting any rustflags. The structure of my workspace is like this
The final target For each build, the |
I checked out the
|
I created this minimum reproducer https://github.com/kanru/corrosion-issue-309 It looks like it's caused by the lib member and the bin member both depending on the root package. If I remove the dependency from the bin member then I can no longer reproduce. Test setup
Expected: run second |
Thanks for the minimal example! This is a regression most likely introduced by commit fa4e241 - |
I can confirm that adding Btw, I notice the doc for NO_LINKER_OVERRIDE and PROFILE option is reversed in the README.md file. |
Windows and |
Closing - The immediate issue was already solved. Tracking the possibility of overrding the target-dir per cmake target in issue #328 |
Currently all the cargo-build targets use the same
cargo_target_dir
"${CMAKE_BINARY_DIR}/${build_dir}/cargo/build"
In my case a workspace with multiple packages, this always causes rebuilding each package for each build.
Ideally packages in the same workspace should be able to share artifacts but I'm not sure if it's easy to do. At least if we change the
cargo_target_dir
to something like"${CMAKE_BINARY_DIR}/${build_dir}/cargo/${package_name}/target"
then each package can reuse their artifact at the cost of building each dependency once.The text was updated successfully, but these errors were encountered: