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

Build CoreLib as AnyCPU #101084

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">$(TargetArchitecture)</Platform>
<Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
Expand All @@ -59,28 +60,21 @@

<!-- Platform specific properties -->
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<DefineConstants>$(DefineConstants);TARGET_AMD64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x86'">
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_X86</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm'">
<PlatformTarget>arm</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_ARM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_ARM64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'loongarch64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_LOONGARCH64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'riscv64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_RISCV64</DefineConstants>
</PropertyGroup>

Expand Down
6 changes: 1 addition & 5 deletions src/coreclr/nativeaot/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<Platform Condition=" '$(Platform)' == '' ">$(TargetArchitecture)</Platform>
<Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
Expand Down Expand Up @@ -78,20 +79,15 @@

<!-- Platform specific properties -->
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<DefineConstants>TARGET_64BIT;TARGET_AMD64;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x86'">
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>TARGET_32BIT;TARGET_X86;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm'">
<PlatformTarget>arm</PlatformTarget>
<DefineConstants>TARGET_32BIT;TARGET_ARM;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>TARGET_64BIT;TARGET_ARM64;$(DefineConstants)</DefineConstants>
</PropertyGroup>

Expand Down
11 changes: 1 addition & 10 deletions src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
</ItemGroup>

<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
Expand All @@ -48,40 +49,30 @@

<!-- Platform specific properties -->
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<DefineConstants>$(DefineConstants);TARGET_AMD64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x86'">
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_X86</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'armv6'">
<PlatformTarget>arm</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_ARMV6</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm'">
<PlatformTarget>arm</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_ARM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_ARM64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'riscv64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_RISCV64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 's390x'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_S390X</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'wasm'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_WASM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'ppc64le'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);TARGET_POWERPC64</DefineConstants>
</PropertyGroup>

Expand Down
Loading