[lld] r331478 - Added ThinLTO test to verify that index files are not generated if thinlto-index-only is not enabled.

Rumeet Dhindsa via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 13:13:38 PDT 2018


Author: rdhindsa
Date: Thu May  3 13:13:38 2018
New Revision: 331478

URL: http://llvm.org/viewvc/llvm-project?rev=331478&view=rev
Log:
Added ThinLTO test to verify that index files are not generated if thinlto-index-only is not enabled.

Differential Revision: https://reviews.llvm.org/D46405


Modified:
    lld/trunk/test/ELF/lto/thinlto.ll

Modified: lld/trunk/test/ELF/lto/thinlto.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto.ll?rev=331478&r1=331477&r2=331478&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto.ll Thu May  3 13:13:38 2018
@@ -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




More information about the llvm-commits mailing list