aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
authorThad House <thadhouse1@gmail.com>2019-05-31 13:49:13 -0700
committerThad House <thadhouse1@gmail.com>2019-05-31 13:49:13 -0700
commit788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b (patch)
tree173ade0e6960917458afe9dd9fb0c3c2b7f32051 /scripts/bootstrap.ps1
parentf483ae4c7fd04eed671a1de595374f84175311e9 (diff)
parent26a9338c5055193915290527eacb37f2ac7fdcb8 (diff)
downloadvcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.tar.gz
vcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.zip
Merge master
Diffstat (limited to 'scripts/bootstrap.ps1')
-rw-r--r--scripts/bootstrap.ps114
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 07a9fcbaa..b195cc605 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -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",