]> granicus.if.org Git - clang/commit
[LTO] Add -flto-jobs=N to control backend parallelism
authorTeresa Johnson <tejohnson@google.com>
Fri, 23 Sep 2016 20:38:09 +0000 (20:38 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 23 Sep 2016 20:38:09 +0000 (20:38 +0000)
commita428e7b35bc8ded75476c588a86b4d7a2edb788b
treedb2ee55ac733c6a46d310983a4b7a9c09b38d57a
parent0cfdd4dfc678ca33418acad4f7b38df9409b200d
[LTO] Add -flto-jobs=N to control backend parallelism

Summary:
Currently, a linker option must be used to control the backend
parallelism of ThinLTO. The linker option varies depending on the
linker (e.g. gold vs ld64). Add a new clang option -flto-jobs=N
to control this.

I've added in the wiring to pass this to the gold plugin. I also
added in the logic to pass this down in the form I understand that
ld64 uses on MacOS, for the darwin target.

Reviewers: mehdi_amini, dexonsmith

Subscribers: mehdi_amini, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282291 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
lib/Driver/Tools.cpp
test/Driver/lto-jobs.c [new file with mode: 0644]