[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 12 17:38:56 PST 2025
================
@@ -0,0 +1,49 @@
+/// Simple test that DTLTO works with a single input file and generates the
+/// expected set of files with --save-temps applied to the linker.
+///
+/// Note that we also supply --save-temps to the compiler for predictable
+/// bitcode file names.
+
+// RUN: rm -rf %t && mkdir %t && cd %t
+
+// RUN: %clang -target x86_64-linux-gnu %s -shared -flto=thin \
+// RUN: -fthinlto-distributor=%python \
+// RUN: -Xdist %llvm_src_root/utils/dtlto/local.py \
+// RUN: --save-temps \
+// RUN: -fuse-ld=lld \
+// RUN: -nostdlib \
+// RUN: -nostartfiles \
+// RUN: -Wl,--save-temps \
+// RUN: -Werror
+
+/// Check that the required output files have been created.
+// RUN: ls | count 13
+// RUN: ls | FileCheck %s --check-prefix=BITCODE
+// RUN: ls | FileCheck %s --check-prefix=BACKEND
+// RUN: ls | FileCheck %s --check-prefix=NATIVE
+// RUN: ls | FileCheck %s --check-prefix=LLD
+
+/// Files produced by the bitcode compilation.
+// BITCODE: dtlto.bc
----------------
bd1976bris wrote:
Nice. Thanks.
https://github.com/llvm/llvm-project/pull/126654
More information about the cfe-commits
mailing list