summaryrefslogtreecommitdiff
path: root/clang/tools
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2023-02-27 19:35:44 -0800
committerVolodymyr Sapsai <vsapsai@apple.com>2023-03-16 11:57:59 -0700
commita845aeb5d6c869146fa24194a7d0182a4787cad8 (patch)
tree4d2815b0469ed6bf449eec9aac3f64ae852bb9cf /clang/tools
parentc2a5c415ac4e31af0983418a403a4ce5bd749fd4 (diff)
downloadllvm-a845aeb5d6c869146fa24194a7d0182a4787cad8.tar.gz
[Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.
Using two environment variables `CC_PRINT_INTERNAL_STAT` and `CC_PRINT_INTERNAL_STAT_FILE` to work like `CC_PRINT_PROC_STAT`. The purpose of the change is to allow collecting the internal stats without modifying the build scripts. Write all stats to a single file to simplify aggregating the data. Differential Revision: https://reviews.llvm.org/D144981
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/driver/driver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
index a05e0956a479..471d0181ff08 100644
--- a/clang/tools/driver/driver.cpp
+++ b/clang/tools/driver/driver.cpp
@@ -307,6 +307,9 @@ static bool SetBackdoorDriverOutputsFromEnvVars(Driver &TheDriver) {
TheDriver.CCPrintProcessStats =
checkEnvVar<bool>("CC_PRINT_PROC_STAT", "CC_PRINT_PROC_STAT_FILE",
TheDriver.CCPrintStatReportFilename);
+ TheDriver.CCPrintInternalStats =
+ checkEnvVar<bool>("CC_PRINT_INTERNAL_STAT", "CC_PRINT_INTERNAL_STAT_FILE",
+ TheDriver.CCPrintInternalStatReportFilename);
return true;
}