Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate platform lists in BuildIntegration #82395

Merged
merged 7 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/install-native-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case "$os" in
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
;;

osx|mac*|ios*|tvos*)
osx|maccatalyst|ios|iossimulator|tvos|tvossimulator)
echo "Installed xcode version: $(xcode-select -p)"

export HOMEBREW_NO_INSTALL_CLEANUP=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,21 @@

<PropertyGroup Condition="'$(RuntimeIdentifier)' != ''">
<!-- Define the name of the runtime specific compiler package to import -->
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('win'))">win</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('osx'))">osx</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('maccatalyst'))">maccatalyst</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('iossimulator'))">iossimulator</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('ios'))">ios</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('tvossimulator'))">tvossimulator</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('tvos'))">tvos</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('freebsd'))">freebsd</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and ($(RuntimeIdentifier.StartsWith('linux-musl')) or $(RuntimeIdentifier.StartsWith('alpine')))">linux-musl</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == ''">linux</OSIdentifier>
jkotas marked this conversation as resolved.
Show resolved Hide resolved
<_targetOS>$(RuntimeIdentifier.SubString(0, $(RuntimeIdentifier.LastIndexOf('-'))))</_targetOS>
<_indexOfPeriod>$(_targetOS.IndexOf('.'))</_indexOfPeriod>
<_targetOS Condition="'$(_indexOfPeriod)' &gt; -1">$(_targetOS.SubString(0, $(_indexOfPeriod)))</_targetOS>
<_targetOS Condition="$(_targetOS.StartsWith('win'))">win</_targetOS>

<!-- Determine TargetArchitecture from RuntimeIdentifier -->
<RidWithHyphen>$(RuntimeIdentifier)-</RidWithHyphen>
<TargetArchitecture Condition="$(RidWithHyphen.Contains('-x86-'))">x86</TargetArchitecture>
<TargetArchitecture Condition="$(RidWithHyphen.Contains('-x64-'))">x64</TargetArchitecture>
<TargetArchitecture Condition="$(RidWithHyphen.Contains('-arm-'))">arm</TargetArchitecture>
<TargetArchitecture Condition="$(RidWithHyphen.Contains('-arm64-'))">arm64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">unknown</TargetArchitecture>
<TargetArchitecture>$(RuntimeIdentifier.SubString($([MSBuild]::Add($(RuntimeIdentifier.LastIndexOf('-')), 1))))</TargetArchitecture>
jkotas marked this conversation as resolved.
Show resolved Hide resolved

<RuntimeIlcPackageName>runtime.$(OSIdentifier)-$(TargetArchitecture).Microsoft.DotNet.ILCompiler</RuntimeIlcPackageName>
<RuntimeIlcPackageName>runtime.$(_targetOS)-$(TargetArchitecture).Microsoft.DotNet.ILCompiler</RuntimeIlcPackageName>

<!-- Default to host that matches OS architecture on Windows. It allows compilation using msbuild.exe that is x86 by default -->
<IlcHostArch Condition="'$(OS)' == 'Windows_NT' and '$(IlcHostArch)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</IlcHostArch>
<!-- Default to host that matches SDK architecture on non-Windows -->
<IlcHostArch Condition="'$(IlcHostArch)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</IlcHostArch>
<IlcHostPackageName>runtime.$(OSIdentifier)-$(IlcHostArch).Microsoft.DotNet.ILCompiler</IlcHostPackageName>
<IlcHostPackageName>runtime.$(_targetOS)-$(IlcHostArch).Microsoft.DotNet.ILCompiler</IlcHostPackageName>

<IlcCalledViaPackage>true</IlcCalledViaPackage>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<NeedNativePublishSupportForSDK6>$(NETCoreSdkVersion.StartsWith('6'))</NeedNativePublishSupportForSDK6>
</PropertyGroup>
<Import Project="$(ILCompilerTargetsPath)" Condition="'$(NeedNativePublishSupportForSDK6)' == 'true'"/>
<Import Project="$(ILCompilerTargetsPath)" Condition="'$(NeedNativePublishSupportForSDK6)' == 'true'"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NeedNativePublishSupportForSDK6 can be deleted (separate PR). We do not need to keep it around anymore.

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<CppLibCreator>ar</CppLibCreator>
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_</_SymbolPrefix>
<UseLLVMLinker Condition="'$(UseLLVMLinker)' == '' and '$(TargetOS)' == 'freebsd'">true</UseLLVMLinker>
<UseLLVMLinker Condition="'$(UseLLVMLinker)' == '' and '$(_targetOS)' == 'freebsd'">true</UseLLVMLinker>
</PropertyGroup>

<Target Name="SetupOSSpecificProps" DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)">
Expand Down Expand Up @@ -108,7 +108,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<NativeFramework Include="Foundation" />
<NativeFramework Include="Security" />
<!-- The library builds don't reference the GSS API on tvOS builds. -->
<NativeFramework Condition="!$(TargetOS.StartsWith('tvos'))" Include="GSS" />
<NativeFramework Condition="!$(_targetOS.StartsWith('tvos'))" Include="GSS" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -148,16 +148,16 @@ The .NET Foundation licenses this file to you under the MIT license.
<LinkerArg Include="-Wl,-z,relro" Condition="'$(_IsApplePlatform)' != 'true'" />
<!-- binskim warning BA3011 The BIND_NOW flag is missing -->
<LinkerArg Include="-Wl,-z,now" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-Wl,-u,$(_SymbolPrefix)NativeAOT_StaticInitialization" Condition="('$(UseLLVMLinker)' == 'true' or '$(_IsApplePlatform)' == 'true' or '$(TargetOS)' == 'freebsd') and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<LinkerArg Include="-Wl,--require-defined,NativeAOT_StaticInitialization" Condition="'$(UseLLVMLinker)' != 'true' and '$(TargetOS)' == 'linux' and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<LinkerArg Include="-Wl,-u,$(_SymbolPrefix)NativeAOT_StaticInitialization" Condition="('$(UseLLVMLinker)' == 'true' or '$(_IsApplePlatform)' == 'true' or '$(_targetOS)' == 'freebsd') and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<LinkerArg Include="-Wl,--require-defined,NativeAOT_StaticInitialization" Condition="'$(UseLLVMLinker)' != 'true' and '$(_targetOS)' == 'linux' and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<!-- this workaround can be deleted once the minimum supported glibc version
(runtime's official build machine's glibc version) is at least 2.33
see https://github.com/bminor/glibc/commit/99468ed45f5a58f584bab60364af937eb6f8afda -->
<LinkerArg Include="-Wl,--defsym,__xmknod=mknod" Condition="'$(StaticExecutable)' == 'true'" />
<!-- FreeBSD has two versions of the GSSAPI it can use, but we only use the ports version (MIT version) here -->
<LinkerArg Include="-L/usr/local/lib -lgssapi_krb5" Condition="'$(TargetOS)' == 'freebsd'" />
<LinkerArg Include="-L/usr/local/lib -lgssapi_krb5" Condition="'$(_targetOS)' == 'freebsd'" />
<!-- FreeBSD's inotify is an installed package and not found in default libraries -->
<LinkerArg Include="-L/usr/local/lib -linotify" Condition="'$(TargetOS)' == 'freebsd'" />
<LinkerArg Include="-L/usr/local/lib -linotify" Condition="'$(_targetOS)' == 'freebsd'" />

<LinkerArg Include="@(NativeFramework->'-framework %(Identity)')" Condition="'$(_IsApplePlatform)' == 'true'" />
</ItemGroup>
Expand Down
Loading