brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 1a10d18 Raw
41 lines · plain
1# REQUIRES: x862 3## Test that DTLTO options are passed correctly to the distributor and4## remote compiler.5 6RUN: rm -rf %t && split-file %s %t && cd %t7 8RUN: opt -thinlto-bc foo.ll -o foo.o9 10## Note: validate.py does not perform any compilation. Instead, it validates the11## received JSON, pretty-prints the JSON and the supplied arguments, and then12## exits with an error. This allows FileCheck directives to verify the13## distributor inputs.14RUN: not ld.lld foo.o \15RUN:   -o my.elf \16RUN:   --thinlto-distributor=%python \17RUN:   --thinlto-distributor-arg=%llvm_src_root/utils/dtlto/validate.py \18RUN:   --thinlto-distributor-arg=darg1=10 \19RUN:   --thinlto-distributor-arg=darg2=20 \20RUN:   --thinlto-remote-compiler=my_clang.exe \21RUN:   --thinlto-remote-compiler-arg=carg1=20 \22RUN:   --thinlto-remote-compiler-arg=carg2=30 2>&1 | FileCheck %s23 24CHECK: distributor_args=['darg1=10', 'darg2=20']25 26CHECK: "linker_output": "my.elf"27 28CHECK: "my_clang.exe"29CHECK: "carg1=20"30CHECK: "carg2=30"31 32CHECK: error: DTLTO backend compilation: cannot open native object file:33 34#--- foo.ll35target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"36target triple = "x86_64-unknown-linux-gnu"37 38define void @foo() {39  ret void40}41