brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · b59fb48 Raw
55 lines · c
1// REQUIRES: lld2 3/// Check DTLTO options are forwarded to the linker.4 5/// Check that options are forwarded as expected with --thinlto-distributor=.6// RUN: %python %S/Inputs/dtlto-helper.py %clang %llvm-driver > %t_forward.log7// RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \8// RUN:   -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 \9// RUN:   -fthinlto-distributor=d.exe -Werror >>%t_forward.log 2>&110// RUN: FileCheck %s --input-file=%t_forward.log --check-prefix=FORWARD11 12// FORWARD:      clang-name:[[CLANG:.*]]13// FORWARD-NEXT: prepend-arg:[[PREPEND_ARG:.*]]14// FORWARD:      prospero-lld15// FORWARD-SAME: "--thinlto-distributor=d.exe"16// FORWARD-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"17// FORWARD-SAME: [[PREPEND_ARG]]18// FORWARD-SAME: "--thinlto-distributor-arg=a1"19// FORWARD-SAME: "--thinlto-distributor-arg=a2"20// FORWARD-SAME: "--thinlto-distributor-arg=a3"21 22/// Check that options are not added without --thinlto-distributor= and23/// that a warning is issued for unused -Xthinlto-distributor options.24// RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \25// RUN:   -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 2>&1 | \26// RUN: FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \27// RUN:   --implicit-check-not=remote-compiler28 29// NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a1'30// NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a2,a3'31// NODIST: prospero-lld32 33/// Check the expected arguments are forwarded by default with only34/// --thinlto-distributor=.35// RUN: %python %S/Inputs/dtlto-helper.py %clang %llvm-driver > %t_default.log36// RUN: %clang -flto=thin %s -### --target=x86_64-sie-ps5 \37// RUN:   -fthinlto-distributor=d.exe -Werror >>%t_default.log 2>&138// RUN: FileCheck %s --input-file=%t_default.log --check-prefix=DEFAULT \39// RUN:   --implicit-check-not=distributor --implicit-check-not=remote-compiler40 41// DEFAULT:      clang-name:[[CLANG:.*]]42// DEFAULT-NEXT: prepend-arg:[[PREPEND_ARG:.*]]43// DEFAULT:      prospero-lld44// DEFAULT-SAME: "--thinlto-distributor=d.exe"45// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"46// DEFAULT-SAME: [[PREPEND_ARG]]47 48/// Check that the arguments are forwarded unconditionally even when the49/// compiler is not in LTO mode.50// RUN: %python %S/Inputs/dtlto-helper.py %clang %llvm-driver > %t_noflto.log51// RUN: %clang %s -### --target=x86_64-sie-ps5 \52// RUN:   -fthinlto-distributor=d.exe -Werror >>%t_noflto.log 2>&153// RUN: FileCheck %s --input-file=%t_noflto.log --check-prefix=DEFAULT \54// RUN:   --implicit-check-not=distributor --implicit-check-not=remote-compiler55