brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 83f3f9c Raw
48 lines · plain
1; REQUIRES: x862;; Test to make sure the thinlto-object-suffix-replace option is handled3;; correctly.4; RUN: rm -rf %t && mkdir %t && cd %t5 6;; Generate bitcode file with summary, as well as a minimized bitcode without7; the debug metadata for the thin link.8; RUN: opt --thinlto-bc %s -thin-link-bitcode-file=1.thinlink.bc -o 1.o9 10;; First perform the thin link on the normal bitcode file, and save the11;; resulting index.12; RUN: %lld --thinlto-index-only -dylib 1.o -o 313; RUN: cp 1.o.thinlto.bc 1.o.thinlto.bc.orig14 15;; Next perform the thin link on the minimized bitcode file, and compare dump16;; of the resulting index to the above dump to ensure they are identical.17; RUN: rm -f 1.o.thinlto.bc18;; Make sure it isn't inadvertently using the regular bitcode file.19; RUN: rm -f 1.o20; RUN: %lld --thinlto-index-only --thinlto-object-suffix-replace=".thinlink.bc;.o" \21; RUN:   -dylib 1.thinlink.bc -o 322; RUN: cmp 1.o.thinlto.bc.orig 1.o.thinlto.bc23 24;; Ensure lld generates error if object suffix replace option does not have 'old;new' format25; RUN: rm -f 1.o.thinlto.bc26; RUN: not %lld --thinlto-index-only --thinlto-object-suffix-replace="abc:def" -dylib 1.thinlink.bc \27; RUN:   -o 3 2>&1 | FileCheck %s --check-prefix=ERR128; ERR1: --thinlto-object-suffix-replace= expects 'old;new' format, but got abc:def29 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 1.thinlink.bc.thinlto.bc33; RUN: %lld --thinlto-index-only --thinlto-object-suffix-replace=".abc;.o" -dylib 1.thinlink.bc -o /dev/null34; RUN: ls 1.thinlink.bc.thinlto.bc35 36target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"37target triple = "x86_64-apple-darwin"38 39define void @f() {40entry:41  ret void42}43 44!llvm.dbg.cu = !{}45 46!1 = !{i32 2, !"Debug Info Version", i32 3}47!llvm.module.flags = !{!1}48