summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorbd1976bris <Ben.Dunbobbin@sony.com>2025-07-15 15:06:46 +0100
committerGitHub <noreply@github.com>2025-07-15 15:06:46 +0100
commit5004c59803fdeb3389d30439a6cc8b1ff874df0c (patch)
treebfa4ca3b0316bdbb0c0b377bb2f59e224ce49d4f /cross-project-tests
parent51b6f64b892bf57879389e7031051a3922aa5061 (diff)
[DTLTO][Clang] Add support for Integrated Distributed ThinLTO (#147265)
This patch introduces support for Integrated Distributed ThinLTO (DTLTO) in Clang. DTLTO enables the distribution of ThinLTO backend compilations via external distribution systems, such as Incredibuild, during the traditional link step: https://llvm.org/docs/DTLTO.html. Testing: - `lit` test coverage has been added to Clang's Driver tests. - The DTLTO cross-project tests will use this Clang support. For the design discussion of the DTLTO feature, see: https://github.com/llvm/llvm-project/pull/126654
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/dtlto/ld-dtlto.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/cross-project-tests/dtlto/ld-dtlto.c b/cross-project-tests/dtlto/ld-dtlto.c
index 3ee962346bd4..7dffe2e015bc 100644
--- a/cross-project-tests/dtlto/ld-dtlto.c
+++ b/cross-project-tests/dtlto/ld-dtlto.c
@@ -5,13 +5,11 @@
// RUN: rm -rf %t && mkdir %t && cd %t
-// RUN: %clang --target=x86_64-linux-gnu -c -flto=thin %s -o dtlto.o
-
-// RUN: ld.lld dtlto.o \
-// RUN: --thinlto-distributor=%python \
-// RUN: --thinlto-distributor-arg=%llvm_src_root/utils/dtlto/local.py \
-// RUN: --thinlto-remote-compiler=%clang \
-// RUN: --thinlto-remote-compiler-arg=--save-temps
+// RUN: %clang --target=x86_64-linux-gnu %s -flto=thin -fuse-ld=lld \
+// RUN: -fthinlto-distributor=%python \
+// RUN: -Xthinlto-distributor=%llvm_src_root/utils/dtlto/local.py \
+// RUN: -Wl,--thinlto-remote-compiler-arg=--save-temps \
+// RUN: -nostdlib -Werror
/// Check that the required output files have been created.
// RUN: ls | sort | FileCheck %s
@@ -22,18 +20,15 @@
/// Linked ELF.
// CHECK: {{^}}a.out{{$}}
-/// Produced by the bitcode compilation.
-// CHECK-NEXT: {{^}}dtlto.o{{$}}
-
/// --save-temps output for the backend compilation.
-// CHECK-NEXT: {{^}}dtlto.s{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.0.preopt.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.1.promote.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.2.internalize.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.3.import.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.4.opt.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.5.precodegen.bc{{$}}
-// CHECK-NEXT: {{^}}dtlto.s.resolution.txt{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP:[a-zA-Z0-9_]+]].s{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.0.preopt.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.1.promote.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.2.internalize.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.3.import.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.4.opt.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.5.precodegen.bc{{$}}
+// CHECK-NEXT: {{^}}ld-dtlto-[[TMP]].s.resolution.txt{{$}}
/// No files are expected after.
// CHECK-NOT: {{.}}