Fix cross-compiling argument validation for Linux (#36368)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 14 May 2020 02:17:13 +0000 (04:17 +0200)
committerGitHub <noreply@github.com>
Thu, 14 May 2020 02:17:13 +0000 (22:17 -0400)
* Fix cross-compiling argument validation for Linux

https://github.com/dotnet/runtime/commit/7c66b6fb6fb00dd86d969ec622a9bb2830016375 added a ValidateSet for Windows_NT and Unix even though we don't support building for just "Unix" but for the more concrete OS which is "Linux".

* Update build.ps1

eng/build.ps1

index 6203fee..c5c0031 100644 (file)
@@ -5,7 +5,7 @@ Param(
   [ValidateSet("Debug","Release","Checked")][string[]][Alias('c')]$configuration = @("Debug"),
   [string][Alias('f')]$framework,
   [string]$vs,
-  [ValidateSet("Windows_NT","Unix")][string]$os,
+  [ValidateSet("Windows_NT","Linux","OSX")][string]$os,
   [switch]$allconfigurations,
   [switch]$coverage,
   [string]$testscope,
@@ -21,7 +21,7 @@ function Get-Help() {
   Write-Host "Common settings:"
   Write-Host "  -subset                   Build a subset, print available subsets with -subset help (short: -s)"
   Write-Host "  -vs                       Open the solution with VS for Test Explorer support. Path or solution name (ie -vs Microsoft.CSharp)"
-  Write-Host "  -os                       Build operating system: Windows_NT or Unix"
+  Write-Host "  -os                       Build operating system: Windows_NT, Linux or OSX"
   Write-Host "  -arch                     Build platform: x86, x64, arm or arm64 (short: -a). Pass a comma-separated list to build for multiple architectures."
   Write-Host "  -configuration            Build configuration: Debug, Release or [CoreCLR]Checked (short: -c). Pass a comma-separated list to build for multiple configurations"
   Write-Host "  -runtimeConfiguration     Runtime build configuration: Debug, Release or [CoreCLR]Checked (short: -rc)"