Enable -threads by default.

LLD supports multi-threading, and it seems to be working well as
you can see in r287140. In short, LLD runs a few percent to 30%
faster with -threads and more than 50% faster if you are using
-build-id (your mileage may vary depending on your computer).

However, I don't think most users even don't know about that because
-threads is not a default option.

This patch enables it by default.

Discussion thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/107160.html

llvm-svn: 287237
This commit is contained in:
Rui Ueyama
2016-11-17 17:06:51 +00:00
parent 4cb4c7f4b1
commit 7ee38e00a5

View File

@@ -496,7 +496,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->SaveTemps = Args.hasArg(OPT_save_temps);
Config->Shared = Args.hasArg(OPT_shared);
Config->Target1Rel = getArg(Args, OPT_target1_rel, OPT_target1_abs, false);
Config->Threads = getArg(Args, OPT_threads, OPT_no_threads, false);
Config->Threads = getArg(Args, OPT_threads, OPT_no_threads, true);
Config->Trace = Args.hasArg(OPT_trace);
Config->Verbose = Args.hasArg(OPT_verbose);
Config->WarnCommon = Args.hasArg(OPT_warn_common);