Skip to content

Compiling rust from source uses all available threads #40366

Closed
@sjackman

Description

@sjackman

When building rust from source it uses all available threads. How do I specify the number of threads?

Building rust from source on CircleCI fails because it uses 32 threads and exceeds the available memory. I use make -j12 but it uses 32 threads nonetheless.
There are 32 concurrent processes of cc1plus in this dump from top https://4264-56942570-gh.circle-artifacts.com/0/tmp/memory-usage.txt
See the log file https://circleci.com/gh/Linuxbrew/homebrew-core/4264
and the original issue https://github.com/Linuxbrew/homebrew-core/pull/1953

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions