diff options
-rw-r--r-- | build.cmd | 2 | ||||
-rw-r--r-- | build.proj | 19 | ||||
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json | 2 | ||||
-rw-r--r-- | buildpipeline/DotNet-CoreClr-Trusted-Linux.json | 2 | ||||
-rw-r--r-- | buildpipeline/DotNet-CoreClr-Trusted-Mac.json | 2 | ||||
-rw-r--r-- | buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json | 2 | ||||
-rw-r--r-- | buildpipeline/DotNet-CoreClr-Trusted-Windows.json | 2 | ||||
-rw-r--r-- | config.json | 33 |
9 files changed, 33 insertions, 33 deletions
@@ -337,7 +337,7 @@ REM ============================================================================ if %__RestoreOptData% EQU 1 if %__BuildTypeRelease% EQU 1 ( echo %__MsgPrefix%Restoring the OptimizationData Package - @call %__ProjectDir%\run.cmd sync -optdata %__UnprocessedBuildArgs% + @call %__ProjectDir%\run.cmd build -optdata %__RunArgs% %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( echo %__MsgPrefix%Error: Failed to restore the optimization data package. exit /b 1 diff --git a/build.proj b/build.proj index bbec18785b..1a633a65b4 100644 --- a/build.proj +++ b/build.proj @@ -26,7 +26,15 @@ <Delete Files="$(BinDir)System.Private.CoreLib.*" /> </Target> - <Target Name="RestoreOptData"> + <!-- + BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages" + target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that + the tools are fetched before "Build". + --> + <Target Name="Sync" BeforeTargets="Build" + DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" /> + + <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'"> <PropertyGroup> <_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed> </PropertyGroup> @@ -35,14 +43,7 @@ StandardOutputImportance="Low" /> </Target> - <!-- - BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages" - target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that - the tools are fetched before "Build". - --> - <Target Name="Sync" BeforeTargets="Build" /> - - <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'"> + <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'"> <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj" StandardOutputImportance="Low" /> </Target> @@ -164,7 +164,7 @@ restore_optdata() if [[ ( $__SkipRestoreOptData == 0 ) && ( $__isMSBuildOnNETCoreSupported == 1 ) ]]; then echo "Restoring the OptimizationData package" - "$__ProjectRoot/run.sh" sync -optdata $__UnprocessedBuildArgs + "$__ProjectRoot/run.sh" build -optdata $__RunArgs $__UnprocessedBuildArgs if [ $? != 0 ]; then echo "Failed to restore the optimization data package." exit 1 diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json index 99f5d98e48..04a837f8a6 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json @@ -115,7 +115,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./sync.sh", + "arguments": "run --rm $(DockerCommonRunArgs) ./sync.sh -- /p:BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json index 76ac582f52..1b13a3c743 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json @@ -115,7 +115,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./sync.sh", + "arguments": "run --rm $(DockerCommonRunArgs) ./sync.sh -- /p:BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json index 7e7c993080..a9dffd94ce 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json @@ -35,7 +35,7 @@ }, "inputs": { "filename": "$(Agent.BuildDirectory)/s/sync.sh", - "arguments": "", + "arguments": " -- /p:BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json index 2fe5caa988..b451efff39 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json @@ -77,7 +77,7 @@ }, "inputs": { "filename": "sync.cmd", - "arguments": "-p", + "arguments": "-p -- /p:BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json index 099a187c08..a0ed7b71c2 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json @@ -77,7 +77,7 @@ }, "inputs": { "filename": "sync.cmd", - "arguments": "-p", + "arguments": "-p -- /p:BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/config.json b/config.json index 915c31807c..49a5575451 100644 --- a/config.json +++ b/config.json @@ -84,8 +84,8 @@ "values": [ "Windows_NT", "Linux", "Unix", "OSX", "Android" ], "defaultValue": "${OSName}" }, - "RestoreNETCorePlatforms": { - "description": "MsBuild target that restores the NETCore packages.", + "Sync": { + "description": "MsBuild target that restores the packages.", "valueType": "target", "values": [], "defaultValue": "" @@ -527,6 +527,13 @@ "settings": { "Build": "default" } + }, + "optdata": { + "description": "Restores optimization profile data for the repository.", + "settings": { + "Project": "./build.proj", + "RestoreOptData": "default" + } } }, "defaultValues": { @@ -578,21 +585,7 @@ "settings": { "Project": "./build.proj", "RestoreDuringBuild": true, - "RestoreNETCorePlatforms": "default" - } - }, - "optdata": { - "description": "Restores optimization profile data for the repository.", - "settings": { - "Project": "./build.proj", - "RestoreDuringBuild": true, - "RestoreOptData": "default" - } - }, - "priority": { - "description": "Sets CLRTestPriorityToBuild property.", - "settings": { - "CLRTestPriorityToBuild": "default" + "Sync": "default" } }, "ab": { @@ -655,6 +648,12 @@ "settings": { "BuildNumberMinor": "default" } + }, + "buildType": { + "description": "Sets buildtype.", + "settings": { + "__BuildType": "default" + } } }, "defaultValues": { |