aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2018-12-18 15:22:05 -0800
committerPhil Christensen <philc@microsoft.com>2018-12-18 15:22:05 -0800
commit3cd8d3e85696fba0c0962d07c9f3486c62dcafe8 (patch)
tree26103826af2b25268fd4cc2f86b32718e77f0760 /scripts
parentbc79cf9a7c39067fcbd7765ec8129b232cb35da4 (diff)
parentd2b0798854c16d8644e3ba2f69ffd3baa448f4ec (diff)
downloadvcpkg-3cd8d3e85696fba0c0962d07c9f3486c62dcafe8.tar.gz
vcpkg-3cd8d3e85696fba0c0962d07c9f3486c62dcafe8.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4951
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.sh37
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake3
-rw-r--r--scripts/toolchains/android.cmake13
-rw-r--r--scripts/toolchains/linux.cmake4
-rw-r--r--scripts/vcpkgTools.xml8
5 files changed, 50 insertions, 15 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 5de0998c1..4bb428668 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -1,12 +1,23 @@
#!/bin/sh
vcpkgDisableMetrics="OFF"
+vcpkgUseSystem=false
for var in "$@"
do
- if [ "$var" = "-disableMetrics" ]; then
+ if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then
vcpkgDisableMetrics="ON"
+ elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then
+ vcpkgUseSystem=true
+ elif [ "$var" = "-help" -o "$var" = "--help" ]; then
+ echo "Usage: ./bootstrap-vcpkg.sh [options]"
+ echo
+ echo "Options:"
+ echo " -help Display usage help"
+ echo " -disableMetrics Do not build metrics reporting into the executable"
+ echo " -useSystemBinaries Force use of the system utilities for building vcpkg"
+ exit 1
else
- echo "Unknown argument $var"
+ echo "Unknown argument $var. Use '-help' for help."
exit 1
fi
done
@@ -191,13 +202,13 @@ selectCXX()
if [ "$gccversion" -lt "6" ]; then
echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7."
echo "On Ubuntu try the following:"
- echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y"
- echo "sudo apt-get update -y"
- echo "sudo apt-get install g++-7 -y"
+ echo " sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y"
+ echo " sudo apt-get update -y"
+ echo " sudo apt-get install g++-7 -y"
echo "On CentOS try the following:"
- echo "sudo yum install centos-release-scl"
- echo "sudo yum install devtoolset-7"
- echo "scl enable devtoolset-7 bash"
+ echo " sudo yum install centos-release-scl"
+ echo " sudo yum install devtoolset-7"
+ echo " scl enable devtoolset-7 bash"
return 1
fi
@@ -206,8 +217,14 @@ selectCXX()
# Preparation
UNAME="$(uname)"
-fetchTool "cmake" "$UNAME" cmakeExe || exit 1
-fetchTool "ninja" "$UNAME" ninjaExe || exit 1
+
+if $vcpkgUseSystem; then
+ cmakeExe="cmake"
+ ninjaExe="ninja"
+else
+ fetchTool "cmake" "$UNAME" cmakeExe || exit 1
+ fetchTool "ninja" "$UNAME" ninjaExe || exit 1
+fi
selectCXX CXX || exit 1
# Do the build
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index ebe46b335..b6cfc4aab 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -153,6 +153,9 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download")
set(ARCHIVE "win_flex_bison-2.5.16.zip")
set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123)
+ if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4" AND SUBDIR STREQUAL "win_flex-2.5.16")
+ file(REMOVE_RECURSE "${PATHS}")
+ endif()
else()
set(PROGNAME flex)
set(APT_PACKAGE_NAME flex)
diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake
index 893463056..69192aeca 100644
--- a/scripts/toolchains/android.cmake
+++ b/scripts/toolchains/android.cmake
@@ -1,11 +1,22 @@
set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
-set(ANDROID_ABI x86_64 CACHE STRING "")
set(ANDROID_TOOLCHAIN clang CACHE STRING "")
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
+if (VCPKG_TARGET_TRIPLET STREQUAL "arm64-android")
+ set(ANDROID_ABI arm64-v8a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "arm-android")
+ set(ANDROID_ABI armeabi-v7a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x64-android")
+ set(ANDROID_ABI x86_64 CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-android")
+ set(ANDROID_ABI x86 CACHE STRING "")
+else()
+ message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}")
+endif()
+
if(DEFINED ENV{ANDROID_NDK_HOME})
set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
else()
diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake
index 6bfb57621..b9cbc0ff3 100644
--- a/scripts/toolchains/linux.cmake
+++ b/scripts/toolchains/linux.cmake
@@ -16,5 +16,9 @@ if(NOT _CMAKE_IN_TRY_COMPILE)
string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
+ if(VCPKG_CRT_LINKAGE STREQUAL "static")
+ string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ")
+ string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ")
+ endif()
endif()
endif()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 650e46b03..9378c7832 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -22,11 +22,11 @@
<archiveName>cmake-3.12.4-Linux-x86_64.tar.gz</archiveName>
</tool>
<tool name="git" os="windows">
- <version>2.19.1</version>
+ <version>2.20.0</version>
<exeRelativePath>cmd\git.exe</exeRelativePath>
- <url>https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/MinGit-2.19.1-32-bit.zip</url>
- <sha512>8a6d2caae2cbaacee073a641cda21465a749325c0af620dabd0e5521c84c92c8d747caa468b111d2ec52b99aee2ee3e6ec41a0a07a8fff582f4c8da568ea329e</sha512>
- <archiveName>MinGit-2.19.1-32-bit.zip</archiveName>
+ <url>https://github.com/git-for-windows/git/releases/download/v2.20.0.windows.1/PortableGit-2.20.0-32-bit.7z.exe</url>
+ <sha512>81647a87df9fde0945ef597cb1cafd8f5f42859da89e9b1db55222a261407bc16bdcc0cf1e86e315697f0981832fe10fc02845cad4b4c82ea64bbd218aec6a49</sha512>
+ <archiveName>PortableGit-2.20.0-32-bit.7z.exe</archiveName>
</tool>
<tool name="git" os="linux">
<version>2.7.4</version>