1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Examples/OrcV2Examples/lljit-with-thinlto-summaries.test
Stefan Gränitz 45e94e8a0b [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples
The example demonstrates how to use a module summary index file produced for ThinLTO to:
* find the module that defines the main entry point
* find all extra modules that are required for the build

A LIT test runs the example as part of the LLVM test suite [1] and shows how to create a module summary index file.
The code also provides two Error types that can be useful when working with ThinLTO summaries.

[1] if LLVM_BUILD_EXAMPLES=ON and platform is not Windows

Differential Revision: https://reviews.llvm.org/D85974
2020-08-23 14:02:10 +02:00

13 lines
513 B
Plaintext

# RUN: opt -module-summary %p/Inputs/main-mod.ll -o main-mod.bc
# RUN: opt -module-summary %p/Inputs/foo-mod.ll -o foo-mod.bc
# RUN: opt -module-summary %p/Inputs/bar-mod.ll -o bar-mod.bc
# RUN: llvm-lto -thinlto -o main-foo-bar main-mod.bc foo-mod.bc bar-mod.bc
# RUN: LLJITWithThinLTOSummaries main-foo-bar.thinlto.bc 2>&1 | FileCheck %s
# CHECK: About to load module: main-mod.bc
# CHECK: About to load module: foo-mod.bc
# CHECK: About to load module: bar-mod.bc
# CHECK: 'main' finished with exit code: 0