-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fix passing build jobs number (-j) to Autotools build helper #12505
Fix passing build jobs number (-j) to Autotools build helper #12505
Conversation
conan/tools/gnu/autotools.py
Outdated
@@ -48,16 +49,19 @@ def make(self, target=None, args=None): | |||
str_args = self._make_args | |||
str_extra_args = " ".join(args) if args is not None else "" | |||
jobs = "" | |||
if "-j" not in str_args and "nmake" not in make_program.lower(): | |||
jobs_already_passed = re.search(r"-j(\d+)", join_arguments([str_args, str_extra_args])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this should be expected. The moment Conan has a standard, defined mechanism to customize the paralelism, this shouldn't be taken into account:
- The profile
njobs
should have priority to what the recipe says. In general, anything defined in the profiles should have priorities - Why would a recipe hardcoded the number of cores it is using in a custom
arg
in the helper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install target doesn't always support multiprocessing in Makefiles (there are examples in conan-center), so recipe must ensure robust installation regardless of njobs in profile.
Changelog: Fix: Give priority to
-j
argument set by user in recipe over the default set by conan inAutotools
build helper.Docs: omit
Closes: #12494
Closes: #12296