[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 08:40:10 PST 2025


================
@@ -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()
----------------
lntue wrote:

I don't think we need the else clause, just let it fail if the linker cannot find libmpfr and libgmp as usual.

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


More information about the libc-commits mailing list