[compiler-rt] [compiler-rt] [test] Look for the right file name suffix for arm targets (PR #137174)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 05:48:08 PDT 2025


https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/137174

Compiler-rt libraries on arm use "arm" or "armhf" as suffix, not the full exact arch name like "armv7".

This matches what was done for the build system in 8e11bede3a6ac11ebcc05c82fac39899feaf9534, to match the names that Clang expects (in getArchNameForCompilerRTLib in Clang).

This fixes building a large number of the compiler-rt tests for Windows/armv7.

>From 03e68571c20c8c26da4e1095300c6b627973e558 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
Date: Mon, 21 Apr 2025 00:30:01 +0300
Subject: [PATCH] [compiler-rt] [test] Look for the right file name suffix for
 arm targets

Compiler-rt libraries on arm use "arm" or "armhf" as suffix, not
the full exact arch name like "armv7".

This matches what was done for the build system in
8e11bede3a6ac11ebcc05c82fac39899feaf9534, to match the names that
Clang expects (in getArchNameForCompilerRTLib in Clang).

This fixes building a large number of the compiler-rt tests for
Windows/armv7.
---
 compiler-rt/test/lit.common.configured.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in
index 019c594e4fece..f673a13be9cba 100644
--- a/compiler-rt/test/lit.common.configured.in
+++ b/compiler-rt/test/lit.common.configured.in
@@ -69,7 +69,13 @@ elif config.android:
   else:
     set_default("target_suffix", "-%s-android" % config.target_arch)
 else:
-  set_default("target_suffix", "-%s" % config.target_arch)
+  if config.target_arch.startswith("arm"):
+    if config.target_arch.endswith("hf"):
+      set_default("target_suffix", "-armhf")
+    else:
+      set_default("target_suffix", "-arm")
+  else:
+    set_default("target_suffix", "-%s" % config.target_arch)
 
 set_default("have_internal_symbolizer", @COMPILER_RT_ENABLE_INTERNAL_SYMBOLIZER_PYBOOL@)
 set_default("have_disable_symbolizer_path_search", @SANITIZER_DISABLE_SYMBOLIZER_PATH_SEARCH_PYBOOL@)



More information about the llvm-commits mailing list