[builtins][test] Use architecture specific float16 check
authorDavid Candler <david.candler@arm.com>
Tue, 16 May 2023 13:13:04 +0000 (14:13 +0100)
committerDavid Candler <david.candler@arm.com>
Tue, 16 May 2023 13:21:22 +0000 (14:21 +0100)
The COMPILER_RT_HAS_FLOAT16 cmake check is now set per architecture,
which needs to be reflected when building the tests.

Additionally added armhf to the architecture list.

Reviewed By: dim

Differential Revision: https://reviews.llvm.org/D150281

compiler-rt/test/builtins/CMakeLists.txt

index 57117f6..466a715 100644 (file)
@@ -46,12 +46,12 @@ foreach(arch ${BUILTIN_TEST_ARCH})
 
   if(APPLE)
     # TODO: Support the new ABI on Apple platforms.
-    if (${arch} MATCHES "arm|aarch64|arm64" AND COMPILER_RT_HAS_FLOAT16)
+    if (${arch} MATCHES "arm|armhf|aarch64|arm64" AND COMPILER_RT_HAS_${arch}_FLOAT16)
       list(APPEND BUILTINS_TEST_TARGET_CFLAGS -DCOMPILER_RT_HAS_FLOAT16)
       string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")
     endif()
   else()
-    if (${arch} MATCHES "arm|aarch64|arm64|i?86|x86_64|AMD64|riscv32|riscv64" AND COMPILER_RT_HAS_FLOAT16)
+    if (${arch} MATCHES "arm|armhf|aarch64|arm64|i?86|x86_64|AMD64|riscv32|riscv64" AND COMPILER_RT_HAS_${arch}_FLOAT16)
       list(APPEND BUILTINS_TEST_TARGET_CFLAGS -DCOMPILER_RT_HAS_FLOAT16)
       string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")
     endif()