brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 26cfa27 Raw
53 lines · plain
1; Test to make sure the thinlto-object-suffix-replace option is handled2; correctly.3 4; Generate bitcode file with summary, as well as a minimized bitcode without5; the debug metadata for the thin link.6; RUN: opt -thinlto-bc %s -thin-link-bitcode-file=%t1.thinlink.bc -o %t1.o7 8; First perform the thin link on the normal bitcode file, and save the9; resulting index.10; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \11; RUN:    -m elf_x86_64 \12; RUN:    --plugin-opt=thinlto \13; RUN:    --plugin-opt=thinlto-index-only \14; RUN:    -shared %t1.o -o %t315; RUN: cp %t1.o.thinlto.bc %t1.o.thinlto.bc.orig16 17; Next perform the thin link on the minimized bitcode file, and compare dump18; of the resulting index to the above dump to ensure they are identical.19; RUN: rm -f %t1.o.thinlto.bc20; Make sure it isn't inadvertently using the regular bitcode file.21; RUN: rm -f %t1.o22; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \23; RUN:    -m elf_x86_64 \24; RUN:    --plugin-opt=thinlto \25; RUN:    --plugin-opt=thinlto-index-only \26; RUN:    --plugin-opt=thinlto-object-suffix-replace=".thinlink.bc;.o" \27; RUN:    -shared %t1.thinlink.bc -o %t328; RUN: diff %t1.o.thinlto.bc.orig %t1.o.thinlto.bc29 30; If filename does not end with old suffix, no suffix change should occur,31; so ".thinlto.bc" will simply be appended to the input file name.32; RUN: rm -f %t1.thinlink.bc.thinlto.bc33; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \34; RUN:    -m elf_x86_64 \35; RUN:    --plugin-opt=thinlto \36; RUN:    --plugin-opt=thinlto-index-only \37; RUN:    --plugin-opt=thinlto-object-suffix-replace=".abc;.o" \38; RUN:    -shared %t1.thinlink.bc -o /dev/null39; RUN: ls %t1.thinlink.bc.thinlto.bc40 41target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"42target triple = "x86_64-unknown-linux-gnu"43 44define void @f() {45entry:46  ret void47}48 49!llvm.dbg.cu = !{}50 51!1 = !{i32 2, !"Debug Info Version", i32 3}52!llvm.module.flags = !{!1}53