File: clang-record-gcc-switches-by-default.patch

package info (click to toggle)
llvm-toolchain-18 1%3A18.1.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,908,340 kB
  • sloc: cpp: 6,667,937; ansic: 1,440,452; asm: 883,619; python: 230,549; objc: 76,880; f90: 74,238; lisp: 35,989; pascal: 16,571; sh: 10,229; perl: 7,459; ml: 5,047; awk: 3,523; makefile: 2,987; javascript: 2,149; xml: 892; fortran: 649; cs: 573
file content (22 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Record GCC-style command-line switches by default
 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.
Author: Zixing Liu <zixing.liu@canonical.com>
Forwarded: https://github.com/llvm/llvm-project/issues/94690
Last-Update: 2024-06-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: llvm-toolchain-18-18.1.6/clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- llvm-toolchain-18-18.1.6.orig/clang/lib/Driver/ToolChains/Clang.cpp
+++ llvm-toolchain-18-18.1.6/clang/lib/Driver/ToolChains/Clang.cpp
@@ -7390,7 +7390,7 @@ void Clang::ConstructJob(Compilation &C,
   // 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);