[libc-commits] [libc] bc2cc8b - Change binary path in libc test cmake file from relative to absolute (#148315)

via libc-commits libc-commits at lists.llvm.org
Sat Jul 12 14:43:55 PDT 2025


Author: Amy Huang
Date: 2025-07-12T14:43:52-07:00
New Revision: bc2cc8b56e2444339ffa58e83a457d15ae18241d

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

LOG: Change binary path in libc test cmake file from relative to absolute (#148315)

For some reason cmake usually turns this path into an absolute path, but
sometimes
it doesn't do it and stays as a relative path, which means the command
will fail.
Specify it as an absolute path always so this doesn't happen any more.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCTestRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 1cd09816e223f..11937c8c8ab08 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -327,7 +327,7 @@ function(create_libc_unittest fq_target_name)
   if(NOT LIBC_UNITTEST_NO_RUN_POSTBUILD)
     add_custom_target(
       ${fq_target_name}
-      COMMAND ${LIBC_UNITTEST_ENV} ${CMAKE_CROSSCOMPILING_EMULATOR} ${fq_build_target_name}
+      COMMAND ${LIBC_UNITTEST_ENV} ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_CURRENT_BINARY_DIR}/${fq_build_target_name}
       COMMENT "Running unit test ${fq_target_name}"
       DEPENDS ${fq_build_target_name}
     )


        


More information about the libc-commits mailing list