[all-commits] [llvm/llvm-project] eb4663: [lld][COFF][ELF][WebAssembly] Replace --[no-]threa...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Mar 31 08:46:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eb4663d8c6add351d758748383f1a9fc231e5e64
      https://github.com/llvm/llvm-project/commit/eb4663d8c6add351d758748383f1a9fc231e5e64
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-03-31 (Tue, 31 Mar 2020)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/COFF/Options.td
    M lld/Common/CMakeLists.txt
    M lld/Common/Filesystem.cpp
    R lld/Common/Threads.cpp
    M lld/ELF/Driver.cpp
    M lld/ELF/ICF.cpp
    M lld/ELF/Options.td
    M lld/ELF/SyntheticSections.cpp
    M lld/docs/ld.lld.1
    M lld/include/lld/Common/Threads.h
    M lld/test/COFF/pdb-globals.test
    M lld/test/ELF/build-id.s
    M lld/test/ELF/lto/thinlto.ll
    A lld/test/ELF/threads.s
    M lld/test/wasm/lto/thinlto.ll
    A lld/test/wasm/threads.s
    M lld/wasm/Driver.cpp
    M lld/wasm/Options.td
    M llvm/include/llvm/Support/Parallel.h
    M llvm/lib/Support/Parallel.cpp
    M llvm/utils/gn/secondary/lld/Common/BUILD.gn

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

--no-threads is a name copied from gold.
gold has --no-thread, --thread-count and several other --thread-count-*.

There are needs to customize the number of threads (running several lld
processes concurrently or customizing the number of LTO threads).
Having a single --threads=N is a straightforward replacement of gold's
--no-threads + --thread-count.

--no-threads is used rarely. So just delete --no-threads instead of
keeping it for compatibility for a while.

If --threads= is specified (ELF,wasm; COFF /threads: is similar),
--thinlto-jobs= defaults to --threads=,
otherwise all available hardware threads are used.

There is currently no way to override a --threads={1,2,...}. It is still
a debate whether we should use --threads=all.

Reviewed By: rnk, aganea

Differential Revision: https://reviews.llvm.org/D76885




More information about the All-commits mailing list