diff --git a/eng/illink.targets b/eng/illink.targets
index 6c2d95c8477237..018075d8b660b5 100644
--- a/eng/illink.targets
+++ b/eng/illink.targets
@@ -236,6 +236,7 @@
$(ILLinkArgs) -b true
$(ILLinkArgs) -x "$(ILLinkDescriptorsLibraryBuildXml)"
+ $(ILLinkArgs) --substitutions "$(ILLinkSubstitutionsLibraryBuildXml)"
$(LinkerNoWarn);IL2067;IL2068;IL2069;IL2070;IL2071;IL2072;IL2073;IL2074;IL2075;IL2076;IL2077;IL2078;IL2079;IL2080;IL2081;IL2082;IL2083;IL2084;IL2085;IL2086;IL2087;IL2088;IL2089;IL2090;IL2091
$(ILLinkArgs) --nowarn $(LinkerNoWarn)
+ $(ILLinkArgs) --disable-opt ipconstprop
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index b153e3f525e6a0..b38d35ebc3440e 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -82,15 +82,7 @@ public static partial class PlatformDetection
private static readonly Lazy s_LinqExpressionsBuiltWithIsInterpretingOnly = new Lazy(GetLinqExpressionsBuiltWithIsInterpretingOnly);
private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly()
{
- Type type = typeof(LambdaExpression);
- if (type != null)
- {
- // The "Accept" method is under FEATURE_COMPILE conditional so it should not exist
- MethodInfo methodInfo = type.GetMethod("Accept", BindingFlags.NonPublic | BindingFlags.Static);
- return methodInfo == null;
- }
-
- return false;
+ return !(bool)typeof(LambdaExpression).GetMethod("get_CanCompileToIL").Invoke(null, Array.Empty