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.
This commit is contained in:
Zixing Liu 2024-07-03 08:06:46 +02:00 committed by Gianfranco Costamagna
parent b9b2b31da9
commit 7bb9784ecb
3 changed files with 31 additions and 0 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
llvm-toolchain-18 (1:18.1.8-2~exp2) UNRELEASED; urgency=medium
[ Zixing Liu <zixing.liu@canonical.com> ]
* d/p/clang-record-gcc-switches-by-default.patch: add a patch to force clang
record gcc switches by default
-- Gianfranco Costamagna <locutusofborg@debian.org> Wed, 03 Jul 2024 08:05:35 +0200
llvm-toolchain-18 (1:18.1.8-2~exp1) experimental; urgency=medium
[ Sylvestre Ledru ]

View File

@ -0,0 +1,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);

View File

@ -151,3 +151,4 @@ arm32-defaults.diff
mips/D154390-pre-R6.diff
libsanitizer-timebits.diff
ubuntu-releases.patch
clang-record-gcc-switches-by-default.patch