[libc-commits] [libc] [libc] fix float_comparison_test when an emulator is used to run the … (PR #97748)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Thu Jul 4 08:43:28 PDT 2024


https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/97748

…test

This patch adds a missing ${CMAKE_CROSSCOMPILING_EMULATOR} to the call to libc_str_to_float_comparison_test so the test can run in an emulator, if required.

This is currently required for the rv32 buildbot, which runs in a qemu emulator.

>From 308ed4c72ddd0430f773afcf1c27367c5c50ea9d Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail at igalia.com>
Date: Thu, 4 Jul 2024 12:39:00 -0300
Subject: [PATCH] [libc] fix float_comparison_test when an emulator is used to
 run the test

This patch adds a missing ${CMAKE_CROSSCOMPILING_EMULATOR} to the call
to libc_str_to_float_comparison_test so the test can run in an emulator,
if required.

This is currently required for the rv32 buildbot, which runs in a qemu
emulator.
---
 libc/test/src/__support/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index ce8413fed7172..1627f5d0f40ec 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -238,7 +238,7 @@ if(NOT LIBC_TARGET_OS_IS_GPU)
 
   add_custom_command(TARGET libc_str_to_float_comparison_test
                      POST_BUILD
-                     COMMAND $<TARGET_FILE:libc_str_to_float_comparison_test> ${float_test_file}
+                     COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:libc_str_to_float_comparison_test> ${float_test_file}
                      DEPENDS ${float_test_file}
                      COMMENT "Test the strtof and strtod implementations against precomputed results."
                      VERBATIM)



More information about the libc-commits mailing list