From c781b08c79913733f33f3e5d26503eae7160c04d Mon Sep 17 00:00:00 2001 From: Zixing Liu Date: Mon, 23 Sep 2024 13:23:31 +0200 Subject: [PATCH] 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 --- clang/lib/Driver/ToolChains/Clang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2