Record GCC-style command-line switches by default
authorZixing Liu <zixing.liu@canonical.com>
Mon, 23 Sep 2024 11:23:31 +0000 (13:23 +0200)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 23 Sep 2024 11:23:31 +0000 (13:23 +0200)
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

index aa344b3465ab2736a1ec5d733ef7e858c1a9dd5a..48913de5a5755baaacad4abadc77e5666f367b21 100644 (file)
@@ -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);