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

Uses sysctl -n hw.logicalcpu instead of nproc on macOS #1307

Merged
merged 1 commit into from
May 30, 2022

Conversation

Jouzo
Copy link
Collaborator

@Jouzo Jouzo commented May 30, 2022

What kind of PR is this?:

/kind fix

What this PR does / why we need it:

Fixes make.sh on macOS by using sysctl -n hw.logicalcpu as default MAKE_JOBS value.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@prasannavl prasannavl merged commit c5b2f65 into master May 30, 2022
@prasannavl prasannavl deleted the fix/macos_make_sh branch May 30, 2022 14:36
@prasannavl
Copy link
Member

prasannavl commented May 30, 2022

Merging for now. But note however: https://gitlab.haskell.org/ghc/ghc/-/issues/8594

Appears that ncpu is deprecated, but logicalcpu_max might be a better fit since it won't drop based on power management. Have no knowledge of how this works on Mac - but the basic rationale is if this selects a lower number due to battery being in low power, and then switching to high power, it'll still run awfully slow, I assume - probably doesn't matter for compile, but would be easier to keep this consistent. But if you think being a better citizen of the platform is the better choice, and this is more appropriate, let's stick to this.

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.

None yet

3 participants