Adjusted the way in which Platform is set for finalizer. Now, it is set prior to calling the Arcade SDK, so the OutputPath properly includes the Architecture folder.
This commit is contained in:
parent
5a9e492894
commit
35bfedb19b
4 changed files with 28 additions and 10 deletions
|
@ -1,11 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
|
||||
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
|
||||
<Copyright>$(CopyrightNetFoundation)</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
||||
|
@ -14,7 +8,24 @@
|
|||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
|
||||
|
||||
<!--
|
||||
The finalizer project needs to have Platform set to build for the correct architecture.
|
||||
Platform needs to be set prior to calling the Arcade SDK, which sets PlatformName in RepoDefaults.props and modifies the OutputPath in ProjectLayout.props to include a PlatformName folder in the path.
|
||||
Currently, build.cmd calls run-build.ps1, which always sets the Architecture.
|
||||
However, if you wanted to build the finalizer project directly, the Architecture will use the logic above to be set properly, and thus maintain the correct OutputPath.
|
||||
Note: The redist project does use Architecture. The Arcade SDK does not use either BuildArchitecture or Architecture.
|
||||
-->
|
||||
<Platform Condition="$(SetPlatformFromArchitecture) == 'true' And ('$(Platform)' == '' Or $(Platform) == 'AnyCPU')">$(Architecture)</Platform>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
|
||||
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
|
||||
<Copyright>$(CopyrightNetFoundation)</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(PgoInstrument)' == 'true'">
|
||||
<SkipBuildingInstallers>true</SkipBuildingInstallers>
|
||||
<PgoTerm>-pgo</PgoTerm>
|
||||
|
|
9
src/finalizer/Directory.Build.props
Normal file
9
src/finalizer/Directory.Build.props
Normal file
|
@ -0,0 +1,9 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<SetPlatformFromArchitecture>true</SetPlatformFromArchitecture>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\Directory.Build.props" />
|
||||
|
||||
</Project>
|
|
@ -1,8 +1,6 @@
|
|||
<!-- Platform needs to be set with TreatAsLocalProperty since it is a global property and cannot be overridden otherwise. -->
|
||||
<Project Sdk="Microsoft.DotNet.CMake.Sdk" TreatAsLocalProperty="Platform">
|
||||
<Project Sdk="Microsoft.DotNet.CMake.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Platform Condition="'$(Platform)' == '' Or $(Platform) == 'AnyCPU'">$(Architecture)</Platform>
|
||||
<!-- We use forward slashes in the ArtifactsDir path because backslashes in the CMakeLists.txt are escape characters. -->
|
||||
<ArtifactsDirForCMake>$([System.String]::Copy($(ArtifactsDir)).Replace('\','/'))</ArtifactsDirForCMake>
|
||||
<CMakeLists>CMakeLists.txt</CMakeLists>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<SdkGenerateBundlePowershellScript>$(SdkPkgSourcesRootDirectory)/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
||||
<GenerateNupkgPowershellScript>$(SdkPkgSourcesRootDirectory)/generatenupkg.ps1</GenerateNupkgPowershellScript>
|
||||
|
||||
<FinalizerExe>$(ArtifactsDir)bin/finalizer/$(Configuration)/bin/finalizer.exe</FinalizerExe>
|
||||
<FinalizerExe>$(ArtifactsDir)bin/finalizer/$(Architecture)/$(Configuration)/bin/finalizer.exe</FinalizerExe>
|
||||
|
||||
<ToolsetInstallerNuspecFile>$(SdkPkgSourcesRootDirectory)/VS.Redist.Common.NetCore.Toolset.nuspec</ToolsetInstallerNuspecFile>
|
||||
<ToolsetInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Toolset.$(Architecture).$(FullNugetVersion).nupkg</ToolsetInstallerNupkgFile>
|
||||
|
|
Loading…
Add table
Reference in a new issue