[all-commits] [llvm/llvm-project] 4be3e9: [Flang-RT][Offload] Always use LLVM-built GTest (#...
Michael Kruse via All-commits
all-commits at lists.llvm.org
Wed Jul 9 03:53:54 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4be3e95284a028bca54f08ded6dc2e8d4ac2ec75
https://github.com/llvm/llvm-project/commit/4be3e95284a028bca54f08ded6dc2e8d4ac2ec75
Author: Michael Kruse <llvm-project at meinersbur.de>
Date: 2025-07-09 (Wed, 09 Jul 2025)
Changed paths:
M flang-rt/CMakeLists.txt
M flang-rt/test/CMakeLists.txt
M flang-rt/unittests/CMakeLists.txt
M offload/CMakeLists.txt
M offload/unittests/CMakeLists.txt
M third-party/unittest/CMakeLists.txt
Log Message:
-----------
[Flang-RT][Offload] Always use LLVM-built GTest (#143682)
The Offload and Flang-RT had the ability to compile GTest themselves.
But in bootstrapping builds, LLVM_LIBRARY_OUTPUT_INTDIR points to the
same location as the stage1 build. If both are building GTest, they
everwrite each others `libllvm_gtest.a` and `libllvm_test_main.a` which
causes #143134.
This PR removes the ability for the Offload/Flang-RT runtimes to build
their own GTest and instead relies on the stage1 build of GTest. This
was already the case with LLVM_INSTALL_GTEST=ON configurations. For
LLVM_INSTALL_GTEST=OFF configurations, we now also export gtest into the
buildtree configuration. Ultimately, this reduces combinatorial
explosion of configurations in which unittests could be built
(LLVM_INSTALL_GTEST=ON, GTest built by Offload, GTest built by Flang-RT,
GTest built by Offload and also used by Flang-RT).
GTest and therefore Offload/Runtime unittests will not be available if
the runtimes are configured against an LLVM install tree. Since llvm-lit
isn't available in the install tree either, it doesn't matter.
Note that compiler-rt and libc also use GTest in non-default
configrations. libc also depends on LLVM's GTest build (and would
error-out if unavailable), but compiler-rt builds it completely
different.
Fixes #143134
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list