diff --git a/debian/changelog b/debian/changelog index a7eb6de0..d2b73270 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-18 (1:18.1.8-2~exp2) UNRELEASED; urgency=medium + + [ Zixing Liu ] + * d/p/clang-record-gcc-switches-by-default.patch: add a patch to force clang + record gcc switches by default + + -- Gianfranco Costamagna Wed, 03 Jul 2024 08:05:35 +0200 + llvm-toolchain-18 (1:18.1.8-2~exp1) experimental; urgency=medium [ Sylvestre Ledru ] diff --git a/debian/patches/clang-record-gcc-switches-by-default.patch b/debian/patches/clang-record-gcc-switches-by-default.patch new file mode 100644 index 00000000..84715c4d --- /dev/null +++ b/debian/patches/clang-record-gcc-switches-by-default.patch @@ -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 +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); diff --git a/debian/patches/series b/debian/patches/series index 20e24549..8892db2c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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