[lld] [llvm] [DTLTO][ELF][COFF] Add archive support for DTLTO. (PR #157043)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 01:24:49 PDT 2025


================
@@ -0,0 +1,35 @@
+REQUIRES: x86-registered-target,ld.lld,llvm-ar
+
+# Test that DTLTO works with a mixture of FullLTO and ThinLTO bitcode archive members
+# where there is more than one LTO partition.
+
+RUN: rm -rf %t && split-file %s %t && cd %t
+
+RUN: %clang --target=x86_64-linux-gnu -flto -c one.c two.c
+RUN: %clang --target=x86_64-linux-gnu -flto=thin -c three.c
+
+RUN: llvm-ar rc archive.a one.o two.o three.o
+
+# Build with DTLTO.
+RUN: %clang --target=x86_64-linux-gnu -Werror -flto -fuse-ld=lld -nostdlib \
+RUN:   -Wl,--whole-archive archive.a \
+RUN:   -Wl,--thinlto-distributor=%python \
----------------
tru wrote:

I know in some earlier instances tests that where referring to %python needed to be quoted when running on windows. I still see this in some of the tests but not all of them - was there a rule when this was needed @bd1976bris ?

https://github.com/llvm/llvm-project/pull/157043


More information about the llvm-commits mailing list