mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 15:27:56 +08:00
Bootstrap: Refining PreferredToolArchitecture (#6398)
* Patch to enable bootstrap on Win32 * [bootstrap-vcpkg] Test OS version to set PreferredToolArchitecture
This commit is contained in:
parent
3c9cd10293
commit
b0b895bff6
@ -339,10 +339,9 @@ if ($disableMetrics)
|
||||
|
||||
$platform = "x86"
|
||||
$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release"
|
||||
|
||||
$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
|
||||
if ($win64)
|
||||
{
|
||||
$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
|
||||
if (-not $architecture -like "*64*")
|
||||
{
|
||||
throw "Cannot build 64-bit on non-64-bit system"
|
||||
@ -352,6 +351,15 @@ if ($win64)
|
||||
$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x64.release"
|
||||
}
|
||||
|
||||
if ($architecture -like "*64*")
|
||||
{
|
||||
$PreferredToolArchitecture = "x64"
|
||||
}
|
||||
else
|
||||
{
|
||||
$PreferredToolArchitecture = "x86"
|
||||
}
|
||||
|
||||
$arguments = (
|
||||
"`"/p:VCPKG_VERSION=-nohash`"",
|
||||
"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
|
||||
@ -359,7 +367,7 @@ $arguments = (
|
||||
"/p:Platform=$platform",
|
||||
"/p:PlatformToolset=$platformToolset",
|
||||
"/p:TargetPlatformVersion=$windowsSDK",
|
||||
"/p:PreferredToolArchitecture=x64",
|
||||
"/p:PreferredToolArchitecture=$PreferredToolArchitecture",
|
||||
"/verbosity:minimal",
|
||||
"/m",
|
||||
"/nologo",
|
||||
|
Loading…
x
Reference in New Issue
Block a user