[libc-commits] [libc] ffc4224 - [libc][NFC] Adjust some CMake messages for the GPU build

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Mar 31 05:29:03 PDT 2023


Author: Joseph Huber
Date: 2023-03-31T07:28:44-05:00
New Revision: ffc422463df19b79607bc84bc0b720d999b67ddb

URL: https://github.com/llvm/llvm-project/commit/ffc422463df19b79607bc84bc0b720d999b67ddb
DIFF: https://github.com/llvm/llvm-project/commit/ffc422463df19b79607bc84bc0b720d999b67ddb.diff

LOG: [libc][NFC] Adjust some CMake messages for the GPU build

Summary:
This disables the MPFR warning on the GPU since we can't support it
anyway. Also fixes a misspelled message.

Added: 
    

Modified: 
    libc/cmake/modules/prepare_libc_gpu_build.cmake
    libc/utils/MPFRWrapper/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index e8cf94c0c898..d28cc3f57637 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -21,7 +21,7 @@ if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
         ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
   message(FATAL_ERROR "Cannot build libc for GPU. CMake compiler "
                       "'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
-                      " is not `Clang ${req_ver}.")
+                      " is not 'Clang ${req_ver}'.")
 endif()
 if(NOT LLVM_LIBC_FULL_BUILD)
   message(FATAL_ERROR "LLVM_LIBC_FULL_BUILD must be enabled to build libc for "

diff  --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index 950b9b76fa93..482c3742aa60 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -20,6 +20,6 @@ if(LIBC_TESTS_CAN_USE_MPFR)
     target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
   endif()
   target_link_libraries(libcMPFRWrapper LibcFPTestHelpers LibcUnitTest mpfr gmp libc_test_utils)
-else()
+elseif(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU)
   message(WARNING "Math tests using MPFR will be skipped.")
 endif()


        


More information about the libc-commits mailing list