[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 13:08:06 PST 2023


vsapsai added inline comments.


================
Comment at: clang/test/Driver/save-stats.c:26
 // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats"
+// CHECK-LTO: "-plugin-opt=-stats-file-append"
 
----------------
ahatanak wrote:
> ahatanak wrote:
> > Doesn't this require `stats-file-append` to be supported by the plugin just like `stats-file` is supported?
> > 
> > https://github.com/llvm/llvm-project/blob/main/llvm/tools/gold/gold-plugin.cpp#L309
> Do we want to pass `stats-file-append` in `tools::addLTOOptions`?
You are right with the gold-plugin. I think I'll drop any changes for LTO now because that's not my purpose and I don't want to change emission of stats for something I don't work on. Also I believe it creates discrepancies for different linker plugins and I really don't want to introduce this inconsistency.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144981/new/

https://reviews.llvm.org/D144981



More information about the cfe-commits mailing list