]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
package.py: skip dwarfsrcfiles for Clang LTO static libraries
authormark.yang <mark.yang@lge.com>
Sun, 28 Dec 2025 03:19:53 +0000 (12:19 +0900)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Jan 2026 11:21:21 +0000 (11:21 +0000)
commitc66f4a148086b5d25b11f95e7d84d9baf3530b5f
tree92493a22c5e75cc1e73b2d9a1e43ad54d7afd5e4
parent623c20ff1e989730138c3fbe6e8247eaada20707
package.py: skip dwarfsrcfiles for Clang LTO static libraries

When using Clang toolchain with LTO enabled, static libraries (.a) contain
LLVM bitcode objects instead of ELF objects. dwarfsrcfiles cannot process
these files and fails with "not a valid ELF file" error.

Rather than catching the error message, guard the dwarfsrcfiles call by
checking for the specific conditions: static library (using is_static_lib()
magic check) + clang toolchain + lto in DISTRO_FEATURES. When all conditions
are met, skip the call silently.

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package.py