[Libomptarget] Add test config for compiling in LTO-mode
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 10 Jun 2022 16:30:19 +0000 (12:30 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 14 Jun 2022 14:16:03 +0000 (10:16 -0400)
commitd5d836635c76bbd3752587a84ae53ed88883d062
treedbfc3b844d5dfac00f15781ceb51302ada7ab887
parent3260d423987aa946528b713841c853032849a380
[Libomptarget] Add test config for compiling in LTO-mode

We are planning on making LTO the default compilation mode for
offloading. In order to make sure it works we should run these tests on
the test suite. AMDGPU already uses the LTO compilation path for its
linking, but in LTO mode it also links the static library late.

Performing LTO requires the static library to be built, if we make the
change this will be a hard requirement and the old bitcode library will
go away. This means users will need to use either a two-step build or a
runtimes build for libomptarget.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D127512
22 files changed:
openmp/libomptarget/CMakeLists.txt
openmp/libomptarget/plugins/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
openmp/libomptarget/plugins/cuda/CMakeLists.txt
openmp/libomptarget/test/lit.cfg
openmp/libomptarget/test/mapping/data_member_ref.cpp
openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
openmp/libomptarget/test/mapping/lambda_by_value.cpp
openmp/libomptarget/test/mapping/lambda_mapping.cpp
openmp/libomptarget/test/mapping/map_back_race.cpp
openmp/libomptarget/test/mapping/ompx_hold/struct.c
openmp/libomptarget/test/offloading/bug49021.cpp
openmp/libomptarget/test/offloading/bug49334.cpp
openmp/libomptarget/test/offloading/bug49779.cpp
openmp/libomptarget/test/offloading/bug51781.c
openmp/libomptarget/test/offloading/host_as_target.c
openmp/libomptarget/test/offloading/memory_manager.cpp
openmp/libomptarget/test/offloading/parallel_offloading_map.cpp
openmp/libomptarget/test/offloading/static_linking.c
openmp/libomptarget/test/offloading/taskloop_offload_nowait.cpp
openmp/libomptarget/test/unified_shared_memory/api.c