[libc-commits] [libc] [libc] Update include directory for libcMPCommon target when LLVM_LIBC_MPFR_INSTALL_PATH is set. (PR #124765)

via libc-commits libc-commits at lists.llvm.org
Tue Jan 28 07:21:47 PST 2025


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/124765

Fix the current riscv32 bot failures.

>From fe0ca868b01f1854c340e55a2681ac6ed5c47b0d Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Tue, 28 Jan 2025 15:18:51 +0000
Subject: [PATCH] [libc] Update include directory for libcMPCommon target when
 LLVM_LIBC_MPFR_INSTALL_PATH is set.

---
 libc/utils/MPFRWrapper/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index 8aeee2463dc51f..f7df9146c8d480 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -16,6 +16,10 @@ if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
     libc.src.__support.FPUtil.cast
     libc.src.__support.FPUtil.fp_bits
   )
+  if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
+    target_include_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
+    target_link_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
+  endif()
   target_include_directories(libcMPCommon PUBLIC ${LIBC_SOURCE_DIR})
   target_link_libraries(libcMPCommon PUBLIC LibcFPTestHelpers.unit mpfr gmp)
 elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)



More information about the libc-commits mailing list