[compiler-rt] [compiler-rt] Delete unused test shell scripts (PR #100889)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 27 12:08:47 PDT 2024


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/100889

This patch deletes two shell scripts in compiler-rt/builtiins/Unit that seemed to have been used to run the tests at some point, but not anymore.

They were originally copied over in
8c1441f86037d62f8e164cc458dff8b91d015998,
but have only been updated once since in what seemed like a simple grep.

These files also got lit testing support about seven years ago in 9b7bbeca48b10a0eb81708650777703ce41e67d7 that I believe makes these scripts completely redundant.

>From 9b7f690ac603af247a97225b0605adb079b9d6bf Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sat, 27 Jul 2024 19:04:52 +0000
Subject: [PATCH] [compiler-rt] Delete unused test shell scripts

This patch deletes two shell scripts in compiler-rt/builtiins/Unit
that seemed to have been used to run the tests at some point, but not
anymore.

They were originally copied over in
8c1441f86037d62f8e164cc458dff8b91d015998,
but have only been updated once since in what seemed like a simple grep.

These files also got lit testing support about seven years ago in
9b7bbeca48b10a0eb81708650777703ce41e67d7 that I believe makes these
scripts completely redundant.
---
 compiler-rt/test/builtins/Unit/ppc/test | 18 -------
 compiler-rt/test/builtins/Unit/test     | 63 -------------------------
 2 files changed, 81 deletions(-)
 delete mode 100755 compiler-rt/test/builtins/Unit/ppc/test
 delete mode 100755 compiler-rt/test/builtins/Unit/test

diff --git a/compiler-rt/test/builtins/Unit/ppc/test b/compiler-rt/test/builtins/Unit/ppc/test
deleted file mode 100755
index 96e06320dbe2a..0000000000000
--- a/compiler-rt/test/builtins/Unit/ppc/test
+++ /dev/null
@@ -1,18 +0,0 @@
-for FILE in $(ls *.c); do
-	if gcc -arch ppc -O0 $FILE ../../../Release/ppc/libcompiler_rt.Optimized.a -mlong-double-128
-	then
-	    echo "Testing $FILE"
-		if ./a.out
-		then
-			rm ./a.out
-		else
-			echo "fail"
-# 			exit 1
-		fi
-	else
-		echo "$FILE failed to compile"
-#		exit 1
-	fi
-done
-echo "pass"
-exit
diff --git a/compiler-rt/test/builtins/Unit/test b/compiler-rt/test/builtins/Unit/test
deleted file mode 100755
index e0683790c225c..0000000000000
--- a/compiler-rt/test/builtins/Unit/test
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env bash
-
-ARCHS='<host>'
-REMOTE=0
-if test `uname` = "Darwin"; then
-  if test "$1" = "armv6"; then
-    ARCHS="armv6"
-    LIBS="-lSystem"
-    REMOTE=1
-    mkdir -p remote
-  else
-    ARCHS="i386 x86_64 ppc"
-    LIBS="-lSystem"
-  fi
-else
-  LIBS="-lc -lm"
-fi
-
-for ARCH in $ARCHS; do
-  CFLAGS="-Os -nodefaultlibs -I../../lib"
-  if test "$ARCH" != '<host>'; then
-    CFLAGS="-arch $ARCH $CFLAGS"
-  fi
-  for FILE in $(ls *.c); do
-    # Use -nodefaultlibs to avoid using libgcc.a
-    # Use -lSystem to link with libSystem.dylb.
-    # Note -lSystem is *after* libcompiler_rt.Optimized.a so that linker will 
-    # prefer our implementation over the ones in libSystem.dylib
-    EXTRA=
-    if test $FILE = gcc_personality_test.c
-    then
-      # the gcc_personality_test.c requires a helper C++ program
-      EXTRA="-fexceptions gcc_personality_test_helper.cxx -lstdc++ /usr/lib/libgcc_s.1.dylib"
-      # the libgcc_s.1.dylib use at the end is a hack until libSystem contains _Unwind_Resume
-    fi
-    if test "$REMOTE" = "1"
-    then 
-      if gcc $CFLAGS $FILE ../../darwin_fat/Release/libcompiler_rt.a $LIBS $EXTRA -o ./remote/$FILE.exe
-      then
-        echo "Built $FILE.exe for $ARCH"
-      else
-        echo "$FILE failed to compile"
-      fi
-    else
-      if gcc $CFLAGS $FILE ../../darwin_fat/Release/libcompiler_rt.a $LIBS $EXTRA
-      then
-        echo "Testing $FILE for $ARCH"
-        if ./a.out
-        then
-          rm ./a.out
-        else
-          echo "fail"
-          exit 1
-        fi
-      else
-        echo "$FILE failed to compile"
-        exit 1
-      fi
-    fi
-  done
-done
-echo "pass"
-exit



More information about the llvm-commits mailing list