diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-07-09 12:53:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 12:53:33 +0200 |
| commit | 4be3e95284a028bca54f08ded6dc2e8d4ac2ec75 (patch) | |
| tree | 884974f91196db96846e0c32be96003c1eface7d /flang/lib/Frontend/CompilerInvocation.cpp | |
| parent | fbb2fa92cb72e426c942d48f0189b70bbd8e476a (diff) | |
| download | llvm-4be3e95284a028bca54f08ded6dc2e8d4ac2ec75.zip llvm-4be3e95284a028bca54f08ded6dc2e8d4ac2ec75.tar.gz llvm-4be3e95284a028bca54f08ded6dc2e8d4ac2ec75.tar.bz2 | |
[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
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
