odin: makefile: fix parallel build #904
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the Makefile for Odin to allow parallel builds (e.g.
make -j$(nproc)
)Description
There were two issues with the way the targets are defined.
The
.%.build
target cannot depend on bothclean
and_init
. It worksfine with a single-core build, but when executing it in parallel, the
clean
target breaks the_init
target. To make it work in parallel the_init
target now directly depends on theclean
target.The
_set_<xxx>
targets have to be executed before the_build_it
target - they cannot be executed at the same time. This has been
reworked to use a dynamically defined targets to avoid creating an extra
wrapper target for each of them.
Motivation and Context
To be able to build Odin using multiple cores.
How Has This Been Tested?
Both mutli and single job builds work for Odin.
Types of changes
Checklist: