diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs index 8c7039e557b457..d391aeed81a18c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs @@ -25,7 +25,7 @@ public ref struct ArgIterator private IntPtr ArgPtr; // Pointer to remaining args. private int RemainingArgs; // # of remaining args. -#if TARGET_WINDOWS // Native Varargs are not supported on Unix +#if (TARGET_WINDOWS && !TARGET_ARM) // Native Varargs are not supported on Unix (all architectures) and Windows ARM [MethodImpl(MethodImplOptions.InternalCall)] private extern ArgIterator(IntPtr arglist); diff --git a/src/coreclr/src/jit/target.h b/src/coreclr/src/jit/target.h index 78384435c5490a..07bb845790acee 100644 --- a/src/coreclr/src/jit/target.h +++ b/src/coreclr/src/jit/target.h @@ -6,10 +6,11 @@ #ifndef TARGET_H_ #define TARGET_H_ -#if defined(TARGET_UNIX) -#define FEATURE_VARARG 0 -#else +// Native Varargs are not supported on Unix (all architectures) and Windows ARM +#if defined(TARGET_WINDOWS) && !defined(TARGET_ARM) #define FEATURE_VARARG 1 +#else +#define FEATURE_VARARG 0 #endif /*****************************************************************************/ diff --git a/src/libraries/System.Runtime/tests/System/ArgIteratorTests.cs b/src/libraries/System.Runtime/tests/System/ArgIteratorTests.cs index 5508c1330ccc51..1ad30e5c861750 100644 --- a/src/libraries/System.Runtime/tests/System/ArgIteratorTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArgIteratorTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.DotNet.XUnitExtensions; using System.Globalization; using System.Reflection; using Xunit; @@ -91,12 +90,6 @@ private static void VerifyTypes(Type[] types, __arglist) [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsArgIteratorNotSupported))] public static unsafe void ArgIterator_Throws_PlatformNotSupportedException() { - if (PlatformDetection.IsWindows && PlatformDetection.IsArmProcess) - { - // Active Issue: https://github.com/dotnet/runtime/issues/35754 - throw new SkipTestException("ArgIterator doesn't throw not supported in ArmProcess"); - } - Assert.Throws(() => new ArgIterator(new RuntimeArgumentHandle())); Assert.Throws(() => { fixed (void* p = "test")