From aa99b607b5cf8ef1260f5661dcbf077f26ee797c Mon Sep 17 00:00:00 2001 From: Tobias Hieta Date: Tue, 8 Nov 2022 09:23:10 +0100 Subject: [clang][pdb] Don't include -fmessage-length in PDB buildinfo As discussed in https://reviews.llvm.org/D136474 -fmessage-length creates problems with reproduciability in the PDB files. This patch just drops that argument when writing the PDB file. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D137322 --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index a6f1fbc..3bb0df4 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -908,6 +908,9 @@ static std::string flattenCommandLine(ArrayRef Args, } if (Arg.startswith("-object-file-name") || Arg == MainFilename) continue; + // Skip fmessage-length for reproduciability. + if (Arg.startswith("-fmessage-length")) + continue; if (PrintedOneArg) OS << " "; llvm::sys::printArg(OS, Arg, /*Quote=*/true); -- cgit v1.1