summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sheplyakov <asheplyakov@altlinux.org>2021-07-12 16:38:06 +0400
committerAlexey Sheplyakov <asheplyakov@altlinux.org>2021-07-12 16:38:06 +0400
commit47a19b96561f42dc216a30fdb4b9e21b89d04278 (patch)
tree93ef439b51029818a986f83a96eead568df19a36
parent68a9d020737449a6bc6cb09cf7161caa47dc498d (diff)
downloaddistcc-git-47a19b96561f42dc216a30fdb4b9e21b89d04278.tar.gz
Revert "Skip distributing LTO cc invocations"
This reverts commit 8dacd28d888210753e9457eb31175d8e2a1c348e. The "LTO invocations are not worth distributing" statement is in general wrong. GCC generates the (target) machine code for every compilation unit even with `-flto` (so it makes sense to distribute these). And the whole program analysis is not guaranteed to be the bottleneck of the build. As a matter of fact distributing LTO compilations reduces the build time of LLVM/clang, GCC, and other programs (especially C++ ones). Closes: #428
-rw-r--r--src/arg.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/arg.c b/src/arg.c
index 73ff707..6ca5130 100644
--- a/src/arg.c
+++ b/src/arg.c
@@ -189,9 +189,6 @@ int dcc_scan_args(char *argv[], char **input_file, char **output_file,
rs_trace("-mtune=native optimizes for local machine; "
"must be local");
return EXIT_DISTCC_FAILED;
- } else if (!strcmp(a, "-flto")) {
- rs_trace("LTO cc invocations are not worth distributing");
- return EXIT_DISTCC_FAILED;
} else if (str_startswith("-Wa,", a)) {
/* Look for assembler options that would produce output
* files and must be local.