diff options
author | Ștefan Talpalaru <stefantalpalaru@yahoo.com> | 2018-09-30 15:40:38 +0200 |
---|---|---|
committer | Ștefan Talpalaru <stefantalpalaru@yahoo.com> | 2018-09-30 15:57:33 +0200 |
commit | 87b2737e09969f495ffd477a18cec240540de3ba (patch) | |
tree | 0c7b67f2e7e11d5c3c86d0c8df32682bd649610f | |
parent | 44cc9b01a48ab39137d6899836f15bba8a1f07fd (diff) | |
download | distcc-git-87b2737e09969f495ffd477a18cec240540de3ba.tar.gz |
add some more GCC args that indicate profiling
Relevant documentation:
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Also relevant is the need to avoid remote compilation when the compiler
might try to use a .gcda file generated locally during a profiling run
(common occurrence during profile-guided optimisation).
-rw-r--r-- | src/arg.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -206,8 +206,12 @@ int dcc_scan_args(char *argv[], char **input_file, char **output_file, seen_opt_s = 1; } else if (!strcmp(a, "-fprofile-arcs") || !strcmp(a, "-ftest-coverage") - || !strcmp(a, "--coverage")) { - rs_log_info("compiler will emit profile info; must be local"); + || !strcmp(a, "--coverage") + || !strncmp(a, "-fprofile-generate", 18) /* it also has an -fprofile-generate=<path> form */ + || !strncmp(a, "-fprofile-use", 13) + || !strncmp(a, "-fauto-profile", 14) + || !strcmp(a, "-fprofile-correction")) { + rs_log_info("compiler will emit/use profile info; must be local"); return EXIT_DISTCC_FAILED; } else if (!strcmp(a, "-frepo")) { rs_log_info("compiler will emit .rpo files; must be local"); |