File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
nativeaot/BuildIntegration Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,19 @@ The .NET Foundation licenses this file to you under the MIT license.
230230 <LinkerArg Include =" -Wl,--eh-frame-hdr" Condition =" '$(_IsApplePlatform)' != 'true'" />
231231 </ItemGroup >
232232
233+ <Exec Command =" xcodebuild -version" Condition =" '$(_IsApplePlatform)' == 'true'" IgnoreExitCode =" true" StandardOutputImportance =" Low" ConsoleToMSBuild =" true" >
234+ <Output TaskParameter =" ExitCode" PropertyName =" _XcodeVersionStringExitCode" />
235+ <Output TaskParameter =" ConsoleOutput" PropertyName =" _XcodeVersionString" />
236+ </Exec >
237+
238+ <PropertyGroup Condition =" ('$(_XcodeVersionStringExitCode)' == '0' or '$(_XcodeVersionStringExitCode)' == '1') and '$(_XcodeVersionString)' != ''" >
239+ <_XcodeVersion >$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))</_XcodeVersion >
240+ </PropertyGroup >
241+
242+ <ItemGroup Condition =" '$(UseLdClassicXCodeLinker)' != 'false' and '$(_IsApplePlatform)' == 'true'" >
243+ <CustomLinkerArg Condition =" '$(_XcodeVersion)' > = '15'" Include =" -ld_classic" />
244+ </ItemGroup >
245+
233246 <PropertyGroup >
234247 <_CommandProbe >command -v</_CommandProbe >
235248 <_CommandProbe Condition =" $([MSBuild]::IsOSPlatform('Windows'))" >where /Q</_CommandProbe >
Original file line number Diff line number Diff line change 7272 <Output TaskParameter =" ConsoleOutput" PropertyName =" _CC_LDFLAGS" />
7373 </Exec >
7474
75+ <Exec Command =" xcodebuild -version" Condition =" '$(_IsApplePlatform)' == 'true'" IgnoreExitCode =" true" StandardOutputImportance =" Low" ConsoleToMSBuild =" true" >
76+ <Output TaskParameter =" ExitCode" PropertyName =" _XcodeVersionStringExitCode" />
77+ <Output TaskParameter =" ConsoleOutput" PropertyName =" _XcodeVersionString" />
78+ </Exec >
79+
80+ <PropertyGroup Condition =" ('$(_XcodeVersionStringExitCode)' == '0' or '$(_XcodeVersionStringExitCode)' == '1') and '$(_XcodeVersionString)' != ''" >
81+ <_XcodeVersion >$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))</_XcodeVersion >
82+ </PropertyGroup >
83+
84+ <ItemGroup Condition =" '$(NativeAotSupported)' == 'true' and '$(_IsApplePlatform)' == 'true'" >
85+ <CustomLinkerArg Condition =" '$(_XcodeVersion)' > = '15'" Include =" -ld_classic" />
86+ </ItemGroup >
87+
7588 <PropertyGroup >
7689 <CppLinker >$(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))</CppLinker >
7790 <_LDFLAGS >$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))</_LDFLAGS >
You can’t perform that action at this time.
0 commit comments