[PATCH] D76885: [lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with --threads={1,2,...} /threads:{1,2,...}

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 09:22:30 PDT 2020


sbc100 added a comment.

In D76885#1951714 <https://reviews.llvm.org/D76885#1951714>, @ruiu wrote:

> Instead of `--threads=all`, can you use `--threads`? `--threads` has several advantages over `--threads=all`:
>
> - it is consistent with other command such as `make`, which takes `-j` for "all" and `-jN` for N threads


I don't disagree with your arguments but from the man page it looks like make `-j` without any args means there is no upper limit at all:

  j [jobs], --jobs[=jobs]
              Specifies  the  number of jobs (commands) to run simultaneously.  If there is more than one -j option, the last one
              is effective.  If the -j option is given without an argument, make will not limit the number of jobs that  can  run
              simultaneously.

Unless I'm misreading.    I guess that is why we very rarely see it in the wild.

> - it is compatible with gold
> - "all" isn't technically very accurate. A more accurate option name would be something like `--threads=same-as-cpu-threads`, but that's fringe. By eliminating an argument, we can avoid naming it.
> 
>   If we are doing this, I'd like to see this to be added to the ELF version.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76885/new/

https://reviews.llvm.org/D76885





More information about the llvm-commits mailing list