diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 71acdacdadd10a..c9ae3083cf5cd4 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -166,6 +166,19 @@ The .NET Foundation licenses this file to you under the MIT license.
+
+
+
+
+
+
+ <_XcodeVersion>$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))
+
+
+
+
+
+
<_CommandProbe>command -v
<_CommandProbe Condition="$([MSBuild]::IsOSPlatform('Windows'))">where /Q
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
index 7122c81034ff31..7c25444f209c33 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
@@ -70,6 +70,19 @@
+
+
+
+
+
+
+ <_XcodeVersion>$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))
+
+
+
+
+
+
$(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
<_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))