2020-04-16 00:54:22 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
; RUN: rm -rf %t && mkdir -p %t && cd %t
|
|
|
|
; RUN: opt -thinlto-bc -o main.bc %s
|
|
|
|
; RUN: opt -thinlto-bc -o foo.bc %S/Inputs/lto-dep.ll
|
|
|
|
|
|
|
|
; Even if the native object is cached, the PDB must be the same.
|
|
|
|
; RUN: rm -rf thinltocachedir && mkdir thinltocachedir
|
|
|
|
|
|
|
|
; RUN: lld-link /lldltocache:thinltocachedir /out:main.exe /entry:main /subsystem:console main.bc foo.bc /debug /pdb:main.pdb
|
|
|
|
|
|
|
|
; RUN: llvm-pdbutil dump --modules main.pdb | FileCheck %s
|
|
|
|
|
|
|
|
; Run again with the cache. Make sure we get the same object names.
|
|
|
|
|
|
|
|
; RUN: lld-link /lldltocache:thinltocachedir /out:main.exe /entry:main /subsystem:console main.bc foo.bc /debug /pdb:main.pdb
|
|
|
|
|
|
|
|
; RUN: llvm-pdbutil dump --modules main.pdb | FileCheck %s
|
|
|
|
|
|
|
|
|
|
|
|
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
|
|
|
|
define i32 @main() {
|
|
|
|
call void @foo()
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
; CHECK: Modules
|
|
|
|
; CHECK: ============================================================
|
[LTO] Suppress emission of empty combined module by default
Summary:
That unless the user requested an output object (--lto-obj-path), the an
unused empty combined module is not emitted.
This changed is helpful for some target (ex. RISCV-V) which encoded the
ABI info in IR module flags (target-abi). Empty unused module has no ABI
info so the linker would get the linking error during merging
incompatible ABIs.
Reviewers: tejohnson, espindola, MaskRay
Subscribers: emaste, inglorion, arichardson, hiraditya, simoncook, MaskRay, steven_wu, dexonsmith, PkmX, dang, lenary, s.egerton, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78988
2020-04-28 11:04:36 +08:00
|
|
|
; CHECK: Mod 0000 | `{{.*}}main.exe.lto.1.obj`:
|
2020-04-16 00:54:22 +08:00
|
|
|
; CHECK: Obj: `{{.*}}main.exe.lto.1.obj`:
|
[LTO] Suppress emission of empty combined module by default
Summary:
That unless the user requested an output object (--lto-obj-path), the an
unused empty combined module is not emitted.
This changed is helpful for some target (ex. RISCV-V) which encoded the
ABI info in IR module flags (target-abi). Empty unused module has no ABI
info so the linker would get the linking error during merging
incompatible ABIs.
Reviewers: tejohnson, espindola, MaskRay
Subscribers: emaste, inglorion, arichardson, hiraditya, simoncook, MaskRay, steven_wu, dexonsmith, PkmX, dang, lenary, s.egerton, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78988
2020-04-28 11:04:36 +08:00
|
|
|
; CHECK: Mod 0001 | `{{.*}}main.exe.lto.2.obj`:
|
2020-04-16 00:54:22 +08:00
|
|
|
; CHECK: Obj: `{{.*}}main.exe.lto.2.obj`:
|
[LTO] Suppress emission of empty combined module by default
Summary:
That unless the user requested an output object (--lto-obj-path), the an
unused empty combined module is not emitted.
This changed is helpful for some target (ex. RISCV-V) which encoded the
ABI info in IR module flags (target-abi). Empty unused module has no ABI
info so the linker would get the linking error during merging
incompatible ABIs.
Reviewers: tejohnson, espindola, MaskRay
Subscribers: emaste, inglorion, arichardson, hiraditya, simoncook, MaskRay, steven_wu, dexonsmith, PkmX, dang, lenary, s.egerton, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78988
2020-04-28 11:04:36 +08:00
|
|
|
; CHECK: Mod 0002 | `* Linker *`:
|