From 84253efd2b151880404618961d1beec3e116904e4e2476ecd9a8e99a6b3768f4 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Thu, 10 Jul 2025 14:47:13 +0000 Subject: [PATCH 1/4] Accepting request 1291725 from home:gbelinassi - Update to version 0~20250710.ac81bbb: * Add compatibility to llvm-20 OBS-URL: https://build.opensuse.org/request/show/1291725 OBS-URL: https://build.opensuse.org/package/show/devel:tools/clang-extract?expand=0&rev=44 --- _service | 2 +- clang-extract-0~20241220.8344124.tar.xz | 3 --- clang-extract-0~20250710.ac81bbb.tar.xz | 3 +++ clang-extract.changes | 6 ++++++ clang-extract.spec | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) delete mode 100644 clang-extract-0~20241220.8344124.tar.xz create mode 100644 clang-extract-0~20250710.ac81bbb.tar.xz diff --git a/_service b/_service index b1d6921..8475970 100644 --- a/_service +++ b/_service @@ -2,7 +2,7 @@ git https://github.com/SUSE/clang-extract - 8344124f604e2ef9202177f5b9ed61962a37c4dc + ac81bbb8f95e6409da2eeee8ef41cc9d7d970241 0~%cd.%h enable mvetter@suse.com diff --git a/clang-extract-0~20241220.8344124.tar.xz b/clang-extract-0~20241220.8344124.tar.xz deleted file mode 100644 index 7a58e03..0000000 --- a/clang-extract-0~20241220.8344124.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e8b87cfcb10ae66effe899d014725ba194b7871c953468b3fd0472d480f6b63 -size 105876 diff --git a/clang-extract-0~20250710.ac81bbb.tar.xz b/clang-extract-0~20250710.ac81bbb.tar.xz new file mode 100644 index 0000000..e7a3f6d --- /dev/null +++ b/clang-extract-0~20250710.ac81bbb.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4320c41bb5a4324ffcaded422870a6ddf3dc5f41f7468150d4b2c2fd08226b9 +size 105956 diff --git a/clang-extract.changes b/clang-extract.changes index bf04823..8c9ef6a 100644 --- a/clang-extract.changes +++ b/clang-extract.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 10 14:29:02 UTC 2025 - mvetter@suse.com + +- Update to version 0~20250710.ac81bbb: + * Add compatibility to llvm-20 + ------------------------------------------------------------------- Fri Dec 20 20:42:18 UTC 2024 - mvetter@suse.com diff --git a/clang-extract.spec b/clang-extract.spec index 796a168..3262831 100644 --- a/clang-extract.spec +++ b/clang-extract.spec @@ -1,7 +1,7 @@ # # spec file for package clang-extract # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: clang-extract -Version: 0~20241220.8344124 +Version: 0~20250710.ac81bbb Release: 0 Summary: A tool to extract code content from source files License: Apache-2.0 WITH LLVM-exception AND NCSA -- 2.51.1 From 3e9eda5daf3fb8eb60a1dfd2864da27c9aea1022dc85eb51473e902a9638bb05 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Wed, 8 Oct 2025 02:18:06 +0000 Subject: [PATCH 2/4] - Update to version 0~20251006.0f2b19f: * Properly handle win32 paths in `get_basename` * Clean warnings and debug prints left in fe587574fc11ee87b5497400a941314bbe936c4c * Remove any use of `basename` * Make sure we get a matching number of #if and #endifs before copying function to output * Fix corner case where struct attributes are declared from #include * Add new expansion policies. * Fix ArrayRef constructor ambiguity on 32-bit systems * Add support to LLVM-21 * Fix ce-inline crashing when no debuginfo is provided OBS-URL: https://build.opensuse.org/package/show/devel:tools/clang-extract?expand=0&rev=46 --- .gitattributes | 23 +++ .gitignore | 1 + _service | 15 ++ clang-extract-0~20250710.ac81bbb.tar.xz | 3 + clang-extract-0~20251006.0f2b19f.tar.xz | 3 + clang-extract.changes | 218 ++++++++++++++++++++++++ clang-extract.spec | 61 +++++++ 7 files changed, 324 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 clang-extract-0~20250710.ac81bbb.tar.xz create mode 100644 clang-extract-0~20251006.0f2b19f.tar.xz create mode 100644 clang-extract.changes create mode 100644 clang-extract.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..9a1f806 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/SUSE/clang-extract + 0f2b19fbf19530b4f710d31bb1978d7a86040f15 + 0~%cd.%h + enable + mvetter@suse.com + + + *.tar + xz + + + diff --git a/clang-extract-0~20250710.ac81bbb.tar.xz b/clang-extract-0~20250710.ac81bbb.tar.xz new file mode 100644 index 0000000..e7a3f6d --- /dev/null +++ b/clang-extract-0~20250710.ac81bbb.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4320c41bb5a4324ffcaded422870a6ddf3dc5f41f7468150d4b2c2fd08226b9 +size 105956 diff --git a/clang-extract-0~20251006.0f2b19f.tar.xz b/clang-extract-0~20251006.0f2b19f.tar.xz new file mode 100644 index 0000000..f31f3fd --- /dev/null +++ b/clang-extract-0~20251006.0f2b19f.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e277f08b10cf0555a36cf31ecc412a036755628456455803ceaae53b220df8d +size 108016 diff --git a/clang-extract.changes b/clang-extract.changes new file mode 100644 index 0000000..17248ab --- /dev/null +++ b/clang-extract.changes @@ -0,0 +1,218 @@ +------------------------------------------------------------------- +Wed Oct 08 02:00:52 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251006.0f2b19f: + * Properly handle win32 paths in `get_basename` + * Clean warnings and debug prints left in fe587574fc11ee87b5497400a941314bbe936c4c + * Remove any use of `basename` + * Make sure we get a matching number of #if and #endifs before copying function to output + * Fix corner case where struct attributes are declared from #include + * Add new expansion policies. + * Fix ArrayRef constructor ambiguity on 32-bit systems + * Add support to LLVM-21 + * Fix ce-inline crashing when no debuginfo is provided + +------------------------------------------------------------------- +Thu Jul 10 14:29:02 UTC 2025 - mvetter@suse.com + +- Update to version 0~20250710.ac81bbb: + * Add compatibility to llvm-20 + +------------------------------------------------------------------- +Fri Dec 20 20:42:18 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241220.8344124: + * Add support to llvm-19 + +------------------------------------------------------------------- +Fri Dec 20 20:41:01 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241002.ec46efd: + * Allow clang-extract to ignore errors pointed by clang + * SymbolExternalizer: Make sure we pass a valid location when searching identifiers + * SymbolExternalizer: Add ! to TOKEN_VECTOR + * libcextract: Passes: Adjust KLP_RELOC_SYMBOL_POS format + * testsuite: inline: inlined-into-1: Fix noinline and implicit-int + * Add option to pass two debuginfos + * Fix symbol visibility + * Disable const propagation on externalized vars + * libcextract: ArgvParser: Use basename instead of std::filename + +------------------------------------------------------------------- +Mon Oct 07 12:56:24 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241002.ec46efd: + * Allow clang-extract to ignore errors pointed by clang + * SymbolExternalizer: Make sure we pass a valid location when searching identifiers + * SymbolExternalizer: Add ! to TOKEN_VECTOR + +------------------------------------------------------------------- +Wed Sep 04 14:23:57 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240902.0a13816: + * libcextract: Passes: Adjust KLP_RELOC_SYMBOL_POS format + * testsuite: inline: inlined-into-1: Fix noinline and implicit-int + * Add option to pass two debuginfos + * Fix symbol visibility + * Disable const propagation on externalized vars + * libcextract: ArgvParser: Use basename instead of std::filename + * Fix Late Externalization when variable is declared as macro expansion + * Dump includetree together with passes dump + * libcextract: ExpansionPolicy: Check for abs and rel path differences + * Remove redundant decls + * Workaround ';' being output at incorrect location when decl ends with #endif + * Fix CompleteDefinition of struct being dragged into output because of union field + * libcextract: ArgvParser: Disable Wduplicate-decl-specifier error + * Disable Precompiled Headers + * libcextract: Add support for Weak symbols for kernel mode + +------------------------------------------------------------------- +Thu Aug 15 04:21:56 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240814.272ac2e: + * Drop VectorRef in favor of ArrayRef + * Fix copyright headers + * Drop use of `dynamic_cast` in favor of `dyn_cast` + * ElfCXX: Convert decompress_gz to use DecompressedObj attribute + * ElfCXX: Make decompress methods access ElfFd directly + +------------------------------------------------------------------- +Wed Aug 14 06:09:40 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240813.82f77f7: + * libcextract: Add support to zstd + * Add support to read zlib compressed files, like vmlinux.gz + * NonLLVMMisc: Add FileHandling class + * Passes: Drop comments about ibt tail content +- Add new BuildRequires: zlib-devel libzstd-devel + +------------------------------------------------------------------- +Fri Aug 02 06:34:40 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240801.6cf5b73: + * libcextract: Passes: Drop attributes when creating the KLP_RELOC entries + * SymbolExternalizer: Drop initializer from expanded macros + * libcextract: ArgvParser: Use vmlinux on PatchObject when DEBUGINFO is different + * libcextract: Passes.cpp: Use vmlinux if sym_mod is empty + * Drop klpe_ prefix for extern function symbols + +------------------------------------------------------------------- +Thu Aug 01 05:37:35 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240731.94276b7: + * Remove functions body from Closure.hh + * Analyze Decls with same BeginLoc + * LLVMMisc.cpp: Check if identifier exists in SymbolTable + * Fix failing testcase if system compiler is gcc-14 + +------------------------------------------------------------------- +Mon Jul 29 07:08:20 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240726.4309abc: + * Fix closure missing TypedefDecl because not being referenced by type + +------------------------------------------------------------------- +Tue Jul 23 03:52:54 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240722.a998e91: + * Fix clang-extract discarding struct-partial definition in nested record + * Add (failing) testcase + * Fix clang-extract dropping complete definition of struct when a copy is necessary + * Fix struct being redefined if defined in variable type + * Extend parent RecordDecl analysis for EnumDecls + * Remove redundant leftmost decl from closure + * Avoid adding every previous decl of a global variable + * Force TagDecl as needing fulldefiniton if is a return type of a function + * Deference pointer types when searching for decomposed typedef-struct + * Analyze CleanupAttr + * Avoid adding previous declarations of typedefs into closure + * SymbolExternalizer: Check KLP_ macros only if there was externzalized syms + +------------------------------------------------------------------- +Mon Jul 22 08:27:55 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240721.9b2dfb6: + * Remove the EnumConstantTable + +------------------------------------------------------------------- +Sat Jul 20 06:18:05 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240720.6054fa3: + * Fix nested struct being discarded if parent struct is flagged as partial + * Fix __builtin_convertvector escaping the closure + * Fix dropped attributes from vector types + +------------------------------------------------------------------- +Mon Jul 15 04:25:50 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240714.17e3908: + * Fix location comment of LateExternalized variables + * Implement first effective use in SymbolExternalizer + * FunctionDepsFinder: Factor out closure logic + +------------------------------------------------------------------- +Fri Jul 12 02:20:58 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240711.74a63c6: + * Implement Late Externalization for STRONG externalization type + * Check the TagDecl in TypedefNameDecl for extra attributes + * Github CI: Drop llvm-16, enable llvm-17 and 18 + * Add logic to get the system's gcc headers install folder + * Undefine noinline macro if conflicts with AST dump + * Store ASTUnit in PrettyPrint instead of SourceManager + +------------------------------------------------------------------- +Fri Jul 05 07:22:03 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240704.16ab0bf: + * IncludeTree: Always check for full name of the header + * Remove unused python packages +- Remove unneeded python BR + +------------------------------------------------------------------- +Thu Jul 04 14:21:48 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240704.d14d609: + * libcextract: ArgvParser: Change path to /usr/lib on x86 32bit + * testsuite: attr: Use esp for current stack point on x86 32bit + +------------------------------------------------------------------- +Thu Jul 4 13:52:13 UTC 2024 - Michael Vetter + +- Put version requirement on llvm-devel + +------------------------------------------------------------------- +Thu Jul 04 06:42:17 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240703.0b3e33c: + * Initialize OutputFunctionPrototypeHeader + +------------------------------------------------------------------- +Tue Jul 02 17:56:02 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240702.cbdca46: + * README.md: Remove dependency on python311-subprocess-tee + * testsuite: attr: Adapt testcase to be executed on ppc64le +- Remove BR python3-subprocess-tee + +------------------------------------------------------------------- +Tue Jul 02 16:46:42 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240702.1f3826f: + * testsuite/attr: Skip tests on s390x + * libtest: Add special dg-skip-on-archs option + +------------------------------------------------------------------- +Fri Jun 28 05:08:31 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240627.52683d1: + * testsuite: Adapt registers usage to aarch64 + * SymbolExternalizer: Refactor Get_Range_Of_Identifier + * SymbolExternalizer: Rewrite to use RecursiveASTVisitor + * SymbolExternalizer: Reduce indentation of _Externalize_Symbol + * SymbolExternalizer: Simplify Externalize_Symbols + +------------------------------------------------------------------- +Thu Jun 20 22:06:35 UTC 2024 - Michael Vetter + +- Initial package of clang-extract git f7c935 for openSUSE diff --git a/clang-extract.spec b/clang-extract.spec new file mode 100644 index 0000000..3f06c61 --- /dev/null +++ b/clang-extract.spec @@ -0,0 +1,61 @@ +# +# spec file for package clang-extract +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: clang-extract +Version: 0~20251006.0f2b19f +Release: 0 +Summary: A tool to extract code content from source files +License: Apache-2.0 WITH LLVM-exception AND NCSA +URL: https://github.com/SUSE/clang-extract +Source: %{name}-%{version}.tar.xz +BuildRequires: clang +BuildRequires: clang-devel +BuildRequires: clang-tools +BuildRequires: cmake +BuildRequires: libelf-devel +BuildRequires: libzstd-devel +BuildRequires: zlib-devel +# At least 16 is needed but 18 has some fixes that we like. +# Leap 15.6 has only 17. +BuildRequires: llvm-devel >= 17 +BuildRequires: meson +BuildRequires: ninja + +%description +A tool to extract code content from source files using the clang and LLVM infrastructure. + +%prep +%autosetup -p1 + +%build +%meson --native-file ce-native.ini +%meson_build + +%install +%meson_install + +%check +%meson_test + +%files +%license LICENSE.TXT +%doc README.md +%{_bindir}/ce-inline +%{_bindir}/clang-extract + +%changelog -- 2.51.1 From 1a10285475034150e75568be86c1d693b98cadad48b789823ec7df6c11d587a4 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Wed, 8 Oct 2025 14:14:58 +0000 Subject: [PATCH 3/4] - Update to version 0~20251008.e818417: * Fix test failing if gcc is 7.5.0 OBS-URL: https://build.opensuse.org/package/show/devel:tools/clang-extract?expand=0&rev=47 --- _service | 2 +- clang-extract-0~20251006.0f2b19f.tar.xz | 3 --- clang-extract-0~20251008.e818417.tar.xz | 3 +++ clang-extract.changes | 6 ++++++ clang-extract.spec | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 clang-extract-0~20251006.0f2b19f.tar.xz create mode 100644 clang-extract-0~20251008.e818417.tar.xz diff --git a/_service b/_service index 9a1f806..9583ca2 100644 --- a/_service +++ b/_service @@ -2,7 +2,7 @@ git https://github.com/SUSE/clang-extract - 0f2b19fbf19530b4f710d31bb1978d7a86040f15 + e8184176dfc568517e63b13840bef57f6663c2be 0~%cd.%h enable mvetter@suse.com diff --git a/clang-extract-0~20251006.0f2b19f.tar.xz b/clang-extract-0~20251006.0f2b19f.tar.xz deleted file mode 100644 index f31f3fd..0000000 --- a/clang-extract-0~20251006.0f2b19f.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e277f08b10cf0555a36cf31ecc412a036755628456455803ceaae53b220df8d -size 108016 diff --git a/clang-extract-0~20251008.e818417.tar.xz b/clang-extract-0~20251008.e818417.tar.xz new file mode 100644 index 0000000..c9685f1 --- /dev/null +++ b/clang-extract-0~20251008.e818417.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cc7e00522cd70ad76d9a0bdcf73b4d51fde55e8a687864a2e476f75db50753c +size 108012 diff --git a/clang-extract.changes b/clang-extract.changes index 17248ab..28ea859 100644 --- a/clang-extract.changes +++ b/clang-extract.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 08 14:10:03 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251008.e818417: + * Fix test failing if gcc is 7.5.0 + ------------------------------------------------------------------- Wed Oct 08 02:00:52 UTC 2025 - mvetter@suse.com diff --git a/clang-extract.spec b/clang-extract.spec index 3f06c61..34659c5 100644 --- a/clang-extract.spec +++ b/clang-extract.spec @@ -17,7 +17,7 @@ Name: clang-extract -Version: 0~20251006.0f2b19f +Version: 0~20251008.e818417 Release: 0 Summary: A tool to extract code content from source files License: Apache-2.0 WITH LLVM-exception AND NCSA -- 2.51.1 From a7199b1a678b501ca6163b3104cde077c07a264b22b04e5c842b640e51428999 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Mon, 20 Oct 2025 15:29:07 +0000 Subject: [PATCH 4/4] - Update to version 0~20251020.19c1329: * Fix compilation error on OBS - Update to version 0~20251016.1f8ed41: * Workaround LLVM bug #162126 * Add support to avoid header expansion * Remove `Get_Source_Manager` from PrettyPrint * Support building on RHEL 8.0 * Eliminate the assert in specific situations. * Disable wordexp on Windows where it is unavailable OBS-URL: https://build.opensuse.org/package/show/devel:tools/clang-extract?expand=0&rev=49 --- .gitattributes | 23 +++ .gitignore | 1 + _service | 15 ++ clang-extract-0~20250710.ac81bbb.tar.xz | 3 + clang-extract-0~20251008.e818417.tar.xz | 3 + clang-extract-0~20251020.19c1329.tar.xz | 3 + clang-extract.changes | 241 ++++++++++++++++++++++++ clang-extract.spec | 64 +++++++ 8 files changed, 353 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 clang-extract-0~20250710.ac81bbb.tar.xz create mode 100644 clang-extract-0~20251008.e818417.tar.xz create mode 100644 clang-extract-0~20251020.19c1329.tar.xz create mode 100644 clang-extract.changes create mode 100644 clang-extract.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..fd2d45c --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/SUSE/clang-extract + 19c13299e893581112c15d6f1d123c4c7f824527 + 0~%cd.%h + enable + mvetter@suse.com + + + *.tar + xz + + + diff --git a/clang-extract-0~20250710.ac81bbb.tar.xz b/clang-extract-0~20250710.ac81bbb.tar.xz new file mode 100644 index 0000000..e7a3f6d --- /dev/null +++ b/clang-extract-0~20250710.ac81bbb.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4320c41bb5a4324ffcaded422870a6ddf3dc5f41f7468150d4b2c2fd08226b9 +size 105956 diff --git a/clang-extract-0~20251008.e818417.tar.xz b/clang-extract-0~20251008.e818417.tar.xz new file mode 100644 index 0000000..c9685f1 --- /dev/null +++ b/clang-extract-0~20251008.e818417.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cc7e00522cd70ad76d9a0bdcf73b4d51fde55e8a687864a2e476f75db50753c +size 108012 diff --git a/clang-extract-0~20251020.19c1329.tar.xz b/clang-extract-0~20251020.19c1329.tar.xz new file mode 100644 index 0000000..db909ff --- /dev/null +++ b/clang-extract-0~20251020.19c1329.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3348deec9d2d58da1db59368cd6d4f753688d022ff38be1e91b061ba191b3bfd +size 110808 diff --git a/clang-extract.changes b/clang-extract.changes new file mode 100644 index 0000000..45a044c --- /dev/null +++ b/clang-extract.changes @@ -0,0 +1,241 @@ +------------------------------------------------------------------- +Mon Oct 20 15:12:01 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251020.19c1329: + * Fix compilation error on OBS + +------------------------------------------------------------------- +Mon Oct 20 13:48:53 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251016.1f8ed41: + * Workaround LLVM bug #162126 + * Add support to avoid header expansion + * Remove `Get_Source_Manager` from PrettyPrint + * Support building on RHEL 8.0 + * Eliminate the assert in specific situations. + * Disable wordexp on Windows where it is unavailable + +------------------------------------------------------------------- +Wed Oct 08 14:10:03 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251008.e818417: + * Fix test failing if gcc is 7.5.0 + +------------------------------------------------------------------- +Wed Oct 08 02:00:52 UTC 2025 - mvetter@suse.com + +- Update to version 0~20251006.0f2b19f: + * Properly handle win32 paths in `get_basename` + * Clean warnings and debug prints left in fe587574fc11ee87b5497400a941314bbe936c4c + * Remove any use of `basename` + * Make sure we get a matching number of #if and #endifs before copying function to output + * Fix corner case where struct attributes are declared from #include + * Add new expansion policies. + * Fix ArrayRef constructor ambiguity on 32-bit systems + * Add support to LLVM-21 + * Fix ce-inline crashing when no debuginfo is provided + +------------------------------------------------------------------- +Thu Jul 10 14:29:02 UTC 2025 - mvetter@suse.com + +- Update to version 0~20250710.ac81bbb: + * Add compatibility to llvm-20 + +------------------------------------------------------------------- +Fri Dec 20 20:42:18 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241220.8344124: + * Add support to llvm-19 + +------------------------------------------------------------------- +Fri Dec 20 20:41:01 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241002.ec46efd: + * Allow clang-extract to ignore errors pointed by clang + * SymbolExternalizer: Make sure we pass a valid location when searching identifiers + * SymbolExternalizer: Add ! to TOKEN_VECTOR + * libcextract: Passes: Adjust KLP_RELOC_SYMBOL_POS format + * testsuite: inline: inlined-into-1: Fix noinline and implicit-int + * Add option to pass two debuginfos + * Fix symbol visibility + * Disable const propagation on externalized vars + * libcextract: ArgvParser: Use basename instead of std::filename + +------------------------------------------------------------------- +Mon Oct 07 12:56:24 UTC 2024 - mvetter@suse.com + +- Update to version 0~20241002.ec46efd: + * Allow clang-extract to ignore errors pointed by clang + * SymbolExternalizer: Make sure we pass a valid location when searching identifiers + * SymbolExternalizer: Add ! to TOKEN_VECTOR + +------------------------------------------------------------------- +Wed Sep 04 14:23:57 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240902.0a13816: + * libcextract: Passes: Adjust KLP_RELOC_SYMBOL_POS format + * testsuite: inline: inlined-into-1: Fix noinline and implicit-int + * Add option to pass two debuginfos + * Fix symbol visibility + * Disable const propagation on externalized vars + * libcextract: ArgvParser: Use basename instead of std::filename + * Fix Late Externalization when variable is declared as macro expansion + * Dump includetree together with passes dump + * libcextract: ExpansionPolicy: Check for abs and rel path differences + * Remove redundant decls + * Workaround ';' being output at incorrect location when decl ends with #endif + * Fix CompleteDefinition of struct being dragged into output because of union field + * libcextract: ArgvParser: Disable Wduplicate-decl-specifier error + * Disable Precompiled Headers + * libcextract: Add support for Weak symbols for kernel mode + +------------------------------------------------------------------- +Thu Aug 15 04:21:56 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240814.272ac2e: + * Drop VectorRef in favor of ArrayRef + * Fix copyright headers + * Drop use of `dynamic_cast` in favor of `dyn_cast` + * ElfCXX: Convert decompress_gz to use DecompressedObj attribute + * ElfCXX: Make decompress methods access ElfFd directly + +------------------------------------------------------------------- +Wed Aug 14 06:09:40 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240813.82f77f7: + * libcextract: Add support to zstd + * Add support to read zlib compressed files, like vmlinux.gz + * NonLLVMMisc: Add FileHandling class + * Passes: Drop comments about ibt tail content +- Add new BuildRequires: zlib-devel libzstd-devel + +------------------------------------------------------------------- +Fri Aug 02 06:34:40 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240801.6cf5b73: + * libcextract: Passes: Drop attributes when creating the KLP_RELOC entries + * SymbolExternalizer: Drop initializer from expanded macros + * libcextract: ArgvParser: Use vmlinux on PatchObject when DEBUGINFO is different + * libcextract: Passes.cpp: Use vmlinux if sym_mod is empty + * Drop klpe_ prefix for extern function symbols + +------------------------------------------------------------------- +Thu Aug 01 05:37:35 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240731.94276b7: + * Remove functions body from Closure.hh + * Analyze Decls with same BeginLoc + * LLVMMisc.cpp: Check if identifier exists in SymbolTable + * Fix failing testcase if system compiler is gcc-14 + +------------------------------------------------------------------- +Mon Jul 29 07:08:20 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240726.4309abc: + * Fix closure missing TypedefDecl because not being referenced by type + +------------------------------------------------------------------- +Tue Jul 23 03:52:54 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240722.a998e91: + * Fix clang-extract discarding struct-partial definition in nested record + * Add (failing) testcase + * Fix clang-extract dropping complete definition of struct when a copy is necessary + * Fix struct being redefined if defined in variable type + * Extend parent RecordDecl analysis for EnumDecls + * Remove redundant leftmost decl from closure + * Avoid adding every previous decl of a global variable + * Force TagDecl as needing fulldefiniton if is a return type of a function + * Deference pointer types when searching for decomposed typedef-struct + * Analyze CleanupAttr + * Avoid adding previous declarations of typedefs into closure + * SymbolExternalizer: Check KLP_ macros only if there was externzalized syms + +------------------------------------------------------------------- +Mon Jul 22 08:27:55 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240721.9b2dfb6: + * Remove the EnumConstantTable + +------------------------------------------------------------------- +Sat Jul 20 06:18:05 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240720.6054fa3: + * Fix nested struct being discarded if parent struct is flagged as partial + * Fix __builtin_convertvector escaping the closure + * Fix dropped attributes from vector types + +------------------------------------------------------------------- +Mon Jul 15 04:25:50 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240714.17e3908: + * Fix location comment of LateExternalized variables + * Implement first effective use in SymbolExternalizer + * FunctionDepsFinder: Factor out closure logic + +------------------------------------------------------------------- +Fri Jul 12 02:20:58 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240711.74a63c6: + * Implement Late Externalization for STRONG externalization type + * Check the TagDecl in TypedefNameDecl for extra attributes + * Github CI: Drop llvm-16, enable llvm-17 and 18 + * Add logic to get the system's gcc headers install folder + * Undefine noinline macro if conflicts with AST dump + * Store ASTUnit in PrettyPrint instead of SourceManager + +------------------------------------------------------------------- +Fri Jul 05 07:22:03 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240704.16ab0bf: + * IncludeTree: Always check for full name of the header + * Remove unused python packages +- Remove unneeded python BR + +------------------------------------------------------------------- +Thu Jul 04 14:21:48 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240704.d14d609: + * libcextract: ArgvParser: Change path to /usr/lib on x86 32bit + * testsuite: attr: Use esp for current stack point on x86 32bit + +------------------------------------------------------------------- +Thu Jul 4 13:52:13 UTC 2024 - Michael Vetter + +- Put version requirement on llvm-devel + +------------------------------------------------------------------- +Thu Jul 04 06:42:17 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240703.0b3e33c: + * Initialize OutputFunctionPrototypeHeader + +------------------------------------------------------------------- +Tue Jul 02 17:56:02 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240702.cbdca46: + * README.md: Remove dependency on python311-subprocess-tee + * testsuite: attr: Adapt testcase to be executed on ppc64le +- Remove BR python3-subprocess-tee + +------------------------------------------------------------------- +Tue Jul 02 16:46:42 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240702.1f3826f: + * testsuite/attr: Skip tests on s390x + * libtest: Add special dg-skip-on-archs option + +------------------------------------------------------------------- +Fri Jun 28 05:08:31 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240627.52683d1: + * testsuite: Adapt registers usage to aarch64 + * SymbolExternalizer: Refactor Get_Range_Of_Identifier + * SymbolExternalizer: Rewrite to use RecursiveASTVisitor + * SymbolExternalizer: Reduce indentation of _Externalize_Symbol + * SymbolExternalizer: Simplify Externalize_Symbols + +------------------------------------------------------------------- +Thu Jun 20 22:06:35 UTC 2024 - Michael Vetter + +- Initial package of clang-extract git f7c935 for openSUSE diff --git a/clang-extract.spec b/clang-extract.spec new file mode 100644 index 0000000..7a4a464 --- /dev/null +++ b/clang-extract.spec @@ -0,0 +1,64 @@ +# +# spec file for package clang-extract +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: clang-extract +Version: 0~20251020.19c1329 +Release: 0 +Summary: A tool to extract code content from source files +License: Apache-2.0 WITH LLVM-exception AND NCSA +URL: https://github.com/SUSE/clang-extract +Source: %{name}-%{version}.tar.xz +BuildRequires: clang >= 17 +BuildRequires: clang-devel >= 17 +#BuildRequires: clang-tools +#BuildRequires: cmake +BuildRequires: ninja +BuildRequires: libelf-devel +BuildRequires: libzstd-devel +BuildRequires: zlib-devel +# At least 16 is needed but 18 has some fixes that we like. +# Leap 15.6 has only 17. +#BuildRequires: llvm-devel +BuildRequires: llvm >= 17 +BuildRequires: meson +BuildRequires: ninja + +%description +A tool to extract code content from source files using the clang and LLVM infrastructure. + +%prep +%autosetup -p1 + +%build +%meson --native-file ce-native.ini +%meson_build + +%install +%meson_install + +%check +%meson_test + +%files +%license LICENSE.TXT +%doc README.md +%{_bindir}/ce-inline +%{_bindir}/clang-extract +%{_bindir}/ce-includetree + +%changelog -- 2.51.1