[libc-commits] [libc] [libc] Disabled mpfr tests in full build mode, even if we set the mpfr path (PR #149655)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Sat Jul 19 08:32:41 PDT 2025


https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/149655

If we are doing a full libc build, mpfr tests should be disabled even if we set the mpfr path. This patch simply swaps the check order.

This should fix the rv32 buildbot.

>From b2b82c6ca4aba3d9a2562506c8b2374402a38721 Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail at igalia.com>
Date: Sat, 19 Jul 2025 12:26:02 -0300
Subject: [PATCH] [libc] Disabled mpfr tests in full build mode, even if we set
 the mpfr path

If we are doing a full libc build, mpfr tests should be disabled even if
we set the mpfr path.

This should fix the rv32 buildbot.
---
 libc/cmake/modules/LLVMLibCCheckMPFR.cmake | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libc/cmake/modules/LLVMLibCCheckMPFR.cmake b/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
index 95815deb07298..c32e25e9d5f50 100644
--- a/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
+++ b/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
@@ -1,11 +1,11 @@
 set(LLVM_LIBC_MPFR_INSTALL_PATH "" CACHE PATH "Path to where MPFR is installed (e.g. C:/src/install or ~/src/install)")
 
-if(LLVM_LIBC_MPFR_INSTALL_PATH)
-  set(LIBC_TESTS_CAN_USE_MPFR TRUE)
-elseif(LIBC_TARGET_OS_IS_GPU OR LLVM_LIBC_FULL_BUILD)
+if(LIBC_TARGET_OS_IS_GPU OR LLVM_LIBC_FULL_BUILD)
   # In full build mode, the MPFR library should be built using our own facilities,
   # which is currently not possible.
   set(LIBC_TESTS_CAN_USE_MPFR FALSE)
+elseif(LLVM_LIBC_MPFR_INSTALL_PATH)
+  set(LIBC_TESTS_CAN_USE_MPFR TRUE)
 else()
   try_compile(
     LIBC_TESTS_CAN_USE_MPFR



More information about the libc-commits mailing list