[PATCH] D46405: Add thinlto test

Rumeet Dhindsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 12:59:39 PDT 2018


rdhindsa created this revision.
rdhindsa added reviewers: pcc, grimar.
Herald added subscribers: llvm-commits, eraman, arichardson, inglorion, emaste.
Herald added a reviewer: espindola.

Added thinlto test to verify that index files are not generated if thinlto-index-only is not enabled.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46405

Files:
  lld/test/ELF/lto/thinlto.ll


Index: lld/test/ELF/lto/thinlto.ll
===================================================================
--- lld/test/ELF/lto/thinlto.ll
+++ lld/test/ELF/lto/thinlto.ll
@@ -33,6 +33,15 @@
 ; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t.o %t4.o -o %t5 2>&1 | FileCheck %s --check-prefix=ERR
 ; ERR: failed to write {{.*}}4.o.thinlto.bc: {{P|p}}ermission denied
 
+; Ensure lld doesn't generates index files when thinlto-index-only is not enabled
+; RUN: rm -f %t.o.thinlto.bc
+; RUN: rm -f %t2.o.thinlto.bc
+; RUN: rm -f %t4.o.thinlto.bc
+; RUN: ld.lld -m elf_x86_64 -shared %t.o %t2.o %t4.o -o %t5
+; RUN: not ls %t.o.thinlto.bc
+; RUN: not ls %t2.o.thinlto.bc
+; RUN: not ls %t4.o.thinlto.bc
+
 ; First force single-threaded mode
 ; RUN: rm -f %t.lto.o %t1.lto.o
 ; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t.o %t2.o -o %t


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46405.145075.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/fcb71ef3/attachment.bin>


More information about the llvm-commits mailing list