Skip to content

Conversation

@lntue
Copy link
Contributor

@lntue lntue commented Jan 28, 2025

Fix the current riscv32 bot failures.

@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

Fix the current riscv32 bot failures.


Full diff: https://github.com/llvm/llvm-project/pull/124765.diff

1 Files Affected:

  • (modified) libc/utils/MPFRWrapper/CMakeLists.txt (+4)
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)

@nickdesaulniers
Copy link
Member

I thought #124702 was supposed to fix this build bot? I'm all for remove -ffreestanding, but are BOTH necessary to fix this build bot?

@lntue
Copy link
Contributor Author

lntue commented Jan 28, 2025

I thought #124702 was supposed to fix this build bot? I'm all for remove -ffreestanding, but are BOTH necessary to fix this build bot?

That one fixes other build bots that have libmpfr and libgmp installed in the system directories that they can find. RISCV32 bot installed mpfr at different location, and use LLVM_LIBC_MPFR_INSTALL_PATH to point to that location, so this PR just adds that to the search path of the new target libcMPCommon similar to libcMPFRWrapper target.

@Sh0g0-1758
Copy link
Member

Sh0g0-1758 commented Jan 28, 2025

@lntue , can you add something similar for MPCWrapper as well ? Perhaps in another PR ?

@lntue lntue merged commit a080498 into llvm:main Jan 28, 2025
16 checks passed
@lntue lntue deleted the riscv32 branch January 28, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants