From 376ff483af9c4e41d3fc903ca973d2597837fdd5 Mon Sep 17 00:00:00 2001
From: Adeel <3840695+am11@users.noreply.github.com>
Date: Sat, 3 Aug 2024 19:30:32 +0300
Subject: [PATCH] Update rest of the csproj files
---
.../SmokeTests/HardwareIntrinsics/X64Avx.csproj | 16 +++-------------
.../HardwareIntrinsics/X64Avx2.csproj | 17 +++--------------
.../HardwareIntrinsics/X64Avx512.csproj | 8 +++-----
.../HardwareIntrinsics/X64Avx_NoAvx2.csproj | 16 +++-------------
4 files changed, 12 insertions(+), 45 deletions(-)
diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj
index 8684274f76590c..50ae60cf0adcd7 100644
--- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj
+++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj
@@ -18,19 +18,9 @@
/dev/null
- if [ $? -ne 0 ]; then
- echo No support for AVX, test not applicable.
- exit 0
- fi
- fi
- if [[ "$OSTYPE" == "linux"* ]]; then
- if ! grep -q '^flags.*avx' /proc/cpuinfo 2>/dev/null; then
- echo No support for AVX, test not applicable.
- exit 0
- fi
+ if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX__; then
+ echo No support for AVX, test not applicable.
+ exit 0
fi
]]>
diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj
index 32679f7769eb32..1b16099167ca42 100644
--- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj
+++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj
@@ -18,20 +18,9 @@
/dev/null
- if [ $? -ne 0 ]; then
- echo No support for AVX2, test not applicable.
- exit 0
- fi
- fi
- if [[ "$OSTYPE" == "linux"* ]]; then
- if ! grep -q '^flags.*avx2' /proc/cpuinfo 2>/dev/null; then
- echo No support for AVX2, test not applicable.
- exit 0
- fi
+ if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX2__; then
+ echo No support for AVX2, test not applicable.
+ exit 0
fi
]]>
diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj
index 80bd8b2645c5e2..abd4987242f304 100644
--- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj
+++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj
@@ -18,11 +18,9 @@
/dev/null; then
- echo No support for AVX512, test not applicable.
- exit 0
- fi
+ if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX512; then
+ echo No support for AVX512, test not applicable.
+ exit 0
fi
]]>
diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx_NoAvx2.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx_NoAvx2.csproj
index ac6528e395032a..c8dabc3d4eb97a 100644
--- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx_NoAvx2.csproj
+++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx_NoAvx2.csproj
@@ -18,19 +18,9 @@
/dev/null
- if [ $? -ne 0 ]; then
- echo No support for AVX, test not applicable.
- exit 0
- fi
- fi
- if [[ "$OSTYPE" == "linux"* ]]; then
- if ! grep -q '^flags.*avx' /proc/cpuinfo 2>/dev/null; then
- echo No support for AVX, test not applicable.
- exit 0
- fi
+ if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX__; then
+ echo No support for AVX, test not applicable.
+ exit 0
fi
]]>