[clang] [Driver][Darwin] Pass stack usage file for LTO (PR #178005)
Marina Taylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 5 04:51:37 PST 2026
================
@@ -660,6 +660,15 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString("-lto-stats-file=" + StatsFile.str()));
}
+ // Set up stack usage file path.
+ if (Args.hasArg(options::OPT_fstack_usage)) {
+ SmallString<128> StackUsageFile(Output.getFilename());
+ llvm::sys::path::replace_extension(StackUsageFile, "su");
----------------
citymarina wrote:
It's what the existing code does in the non-LTO case: https://github.com/llvm/llvm-project/blob/92c26bb1a57b5f8682b0fb21b8acfc32951cb67e/clang/lib/Driver/ToolChains/Clang.cpp#L6515-L6525
https://github.com/llvm/llvm-project/pull/178005
More information about the cfe-commits
mailing list