brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · a833629 Raw
43 lines · plain
1; REQUIRES: x862 3; Test to ensure that thinlto-index-only with lto-obj-path creates4; the native object file.5; RUN: rm -rf %t.dir/objpath && mkdir -p %t.dir/objpath6; RUN: opt -module-summary %s -o %t.dir/objpath/t1.obj7; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t.dir/objpath/t2.obj8; RUN: rm -f %t.dir/objpath/t4.obj9; RUN: lld-link -thinlto-index-only -lto-obj-path:%t.dir/objpath/t4.obj \10; RUN:     -out:%t.dir/objpath/t3.exe -entry:main %t.dir/objpath/t1.obj \11; RUN:     %t.dir/objpath/t2.obj12; RUN: llvm-readobj -h %t.dir/objpath/t4.obj | FileCheck %s13; RUN: llvm-nm %t.dir/objpath/t4.obj 2>&1 | FileCheck %s -check-prefix=SYMBOLS14; RUN: llvm-nm %t.dir/objpath/t4.obj 2>&1 | count 115 16;; Ensure lld emits empty combined module if specific obj-path.17; RUN: lld-link /out:%t.dir/objpath/a.exe -lto-obj-path:%t.dir/objpath/t4.obj \18; RUN:     -entry:main %t.dir/objpath/t1.obj %t.dir/objpath/t2.obj -lldsavetemps19; RUN: ls %t.dir/objpath/a.exe.lto.obj20; RUN: ls %t.dir/objpath/a.exe.lto.t1.obj21; RUN: ls %t.dir/objpath/a.exe.lto.t2.obj22 23;; Ensure lld does not emit empty combined module in default.24; RUN: rm %t.dir/objpath/a.exe.lto.*25; RUN: lld-link /out:%t.dir/objpath/a.exe \26; RUN:     -entry:main %t.dir/objpath/t1.obj %t.dir/objpath/t2.obj -lldsavetemps27; RUN: ls %t.dir/objpath/a.exe.lto.t1.obj28; RUN: ls %t.dir/objpath/a.exe.lto.t2.obj29; RUN: not ls %t.dir/objpath/a.exe.lto.obj30 31; CHECK: Format: COFF-x86-6432; SYMBOLS: @feat.0033 34target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"35target triple = "x86_64-pc-windows-msvc19.0.24215"36 37declare void @g(...)38 39define void @main() {40  call void (...) @g()41  ret void42}43