From 6adf2585a1e070e38ab130e3a908bab3743b588e Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Sun, 17 Apr 2022 15:01:06 +0800 Subject: [PATCH] Expose Clang wrapper's dump usage stats option This allows us to track how much time is spent in Clang. Test: TOOLCHAIN_RUSAGE_OUTPUT=/tmp/rusage.txt m Change-Id: Ib2961904f363bc59bd9d928bb055a96740cb9f17 --- ui/build/dumpvars.go | 3 +++ ui/build/ninja.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go index 11311f997..285f1569b 100644 --- a/ui/build/dumpvars.go +++ b/ui/build/dumpvars.go @@ -205,6 +205,9 @@ func runMakeProductConfig(ctx Context, config Config) { "CCACHE_SLOPPINESS", "CCACHE_BASEDIR", "CCACHE_CPP2", + + // LLVM compiler wrapper options + "TOOLCHAIN_RUSAGE_OUTPUT", } allVars := append(append([]string{ diff --git a/ui/build/ninja.go b/ui/build/ninja.go index 41de6bd7e..dab1a9b58 100644 --- a/ui/build/ninja.go +++ b/ui/build/ninja.go @@ -169,6 +169,9 @@ func runNinjaForBuild(ctx Context, config Config) { "CCACHE_BASEDIR", "CCACHE_CPP2", "CCACHE_DIR", + + // LLVM compiler wrapper options + "TOOLCHAIN_RUSAGE_OUTPUT", }, config.BuildBrokenNinjaUsesEnvVars()...)...) }