From: Zixing Liu Date: Mon, 23 Sep 2024 11:23:31 +0000 (+0200) Subject: Record GCC-style command-line switches by default X-Git-Tag: archive/raspbian/1%19.1.3-1+rpi1~1^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c781b08c79913733f33f3e5d26503eae7160c04d;p=llvm-toolchain-19.git Record GCC-style command-line switches by default Forwarded: https://github.com/llvm/llvm-project/issues/94690 Last-Update: 2024-06-04 This makes Clang default behaviour more like GCC where if debug symbol generation is enabled, the command-line switches data will be stored inside the debug symbols. Last-Update: 2024-06-04 Gbp-Pq: Name clang-record-gcc-switches-by-default.patch --- diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index aa344b3465..48913de5a5 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -7390,7 +7390,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // By default, -gno-record-gcc-switches is set on and no recording. auto GRecordSwitches = Args.hasFlag(options::OPT_grecord_command_line, - options::OPT_gno_record_command_line, false); + options::OPT_gno_record_command_line, true); auto FRecordSwitches = Args.hasFlag(options::OPT_frecord_command_line, options::OPT_fno_record_command_line, false);