Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lorensson <lateralusx.github@gmail.com>2021-01-22 22:26:58 +0300
committerGitHub <noreply@github.com>2021-01-22 22:26:58 +0300
commit51bf70e94b0c6673a444835e1f8b538733188ecc (patch)
tree854d196aed8efc51e7b216639aa760814a20d61f /eng/build.ps1
parent2e426684f679a2be2aa857c53fffc224a004c6e7 (diff)
Windows build.cmd doesn't support -cmakeargs. (#46195)
build.sh supports -cmakeargs making it is possible to pass custom cmake arguments down to native cmake steps, but this feature is missing on Windows when using build.cmd. Trying to do: .\build.cmd -subset clr -c release -cmakeargs "-DFEATURE_PERFTRACING_C_LIB=1" on Windows will result in an error since -cmakeargs is not a known command in build.ps1. Commit adds support for -cmakeargs in build.cmd making sure it gets passed down to runtime build on both CoreClr as well as Mono.
Diffstat (limited to 'eng/build.ps1')
-rw-r--r--eng/build.ps13
1 files changed, 3 insertions, 0 deletions
diff --git a/eng/build.ps1 b/eng/build.ps1
index 1edde94bd28..fe3ff54689b 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -17,6 +17,7 @@ Param(
[ValidateSet("Debug","Release")][string][Alias('lc')]$librariesConfiguration,
[ValidateSet("CoreCLR","Mono")][string][Alias('rf')]$runtimeFlavor,
[switch]$ninja,
+ [string]$cmakeargs,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
@@ -76,6 +77,7 @@ function Get-Help() {
Write-Host ""
Write-Host "Native build settings:"
+ Write-Host " -cmakeargs User-settable additional arguments passed to CMake."
Write-Host " -ninja Use Ninja instead of MSBuild to run the native build."
Write-Host "Command-line arguments not listed above are passed through to MSBuild."
@@ -229,6 +231,7 @@ foreach ($argument in $PSBoundParameters.Keys)
"allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" }
"properties" { $arguments += " " + $properties }
"verbosity" { $arguments += " -$argument " + $($PSBoundParameters[$argument]) }
+ "cmakeargs" { $arguments += " /p:CMakeArgs=`"$($PSBoundParameters[$argument])`"" }
"ninja" { $arguments += " /p:Ninja=$($PSBoundParameters[$argument])" }
# configuration and arch can be specified multiple times, so they should be no-ops here
"configuration" {}