Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg baseline] [vs-yasm] Build yasm instead of downloading it to work around memory corruption bugs in yasm itself. #14003

Merged
merged 20 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
51f7551
Remove trailing slashes from the URL in `vcpkg create`.
BillyONeal Oct 12, 2020
f51f572
[vs-yasm] Workaround yasm memory corruption bugs by building the tool…
BillyONeal Oct 13, 2020
32d24ce
Install yasm-tool:x86-windows first.
BillyONeal Oct 13, 2020
d76ea13
Format-manifest.
BillyONeal Oct 13, 2020
ad2152e
Building yasm needs python.
BillyONeal Oct 13, 2020
c331fec
yasm-tool not yaml-tool.
BillyONeal Oct 13, 2020
6a23857
yaml always needs to build dynamic. (It could be static but this pick…
BillyONeal Oct 13, 2020
38c7512
Merge remote-tracking branch 'origin/master' into build_yasm
BillyONeal Oct 13, 2020
35dc2ad
Fix crosscompilation.
BillyONeal Oct 13, 2020
5ef1f1d
Treat x64 as a crosscompiler for yasm due to:
BillyONeal Oct 13, 2020
8c901ec
elseif
BillyONeal Oct 13, 2020
b234c6f
[yasm-tool-helper][mpg123][libvpx][nettle][gmp] Replace uses of vcpkg…
ras0219-msft Oct 14, 2020
8fc4ceb
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Oct 27, 2020
8726216
Merge branch 'build_yasm' of github.com:ras0219/vcpkg into build_yasm
BillyONeal Oct 27, 2020
11b9b34
Merge remote-tracking branch 'origin/master' into build_yasm
BillyONeal Oct 27, 2020
1c51883
Format
BillyONeal Oct 27, 2020
001b88d
Merge remote-tracking branch 'origin/master' into build_yasm
BillyONeal Oct 28, 2020
d3ea0f8
yasm-tool needs x86
BillyONeal Oct 28, 2020
250329f
Fix Robert code review comments.
BillyONeal Oct 28, 2020
ad56f16
Merge remote-tracking branch 'origin/master' into build_yasm
BillyONeal Oct 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions ports/gmp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ if(VCPKG_TARGET_IS_WINDOWS)
REF e140dfc8668e96d7e56cbd46467945adcc6b3cc4 #v6.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a port-version update.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was intentional because there are no changes in the output but...

SHA512 3b646c142447946bb4556db01214ff130da917bc149946b8cf086f3b01e1cc3d664b941a30a42608799c14461b2f29e4b894b72915d723bd736513c8914729b7
HEAD_REF master
PATCHES
PATCHES
vs.build.patch
runtime.patch
prefix.patch
)
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_DIR "${YASM}" DIRECTORY)
vcpkg_add_to_path("${YASM_DIR}")

include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(OUT_VAR YASM)
file(TO_NATIVE_PATH "${YASM}" YASM)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(CONFIGURATION_RELEASE ReleaseDLL)
Expand Down Expand Up @@ -49,7 +50,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}")
endif()
file(WRITE "${_file}" "${_contents}")

vcpkg_install_msbuild(
USE_VCPKG_INTEGRATION
SOURCE_PATH ${SOURCE_PATH}
Expand All @@ -60,7 +61,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE}
DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG}
SKIP_CLEAN
OPTIONS /p:UseEnv=True
OPTIONS "/p:YasmPath=${YASM}"
)
get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME)
file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include")
Expand All @@ -84,7 +85,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
else()
vcpkg_download_distfile(
ARCHIVE
URLS https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz
URLS https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz
FILENAME gmp-6.2.0.tar.xz
SHA512 a066f0456f0314a1359f553c49fc2587e484ff8ac390ff88537266a146ea373f97a1c0ba24608bf6756f4eab11c9056f103c8deb99e5b57741b4f7f0ec44b90c)

Expand All @@ -107,4 +108,4 @@ else()

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()
endif()
6 changes: 5 additions & 1 deletion ports/gmp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "gmp",
"version-string": "6.2.0",
"port-version": 3,
"port-version": 4,
"description": "The GNU Multiple Precision Arithmetic Library",
"homepage": "https://gmplib.org",
"dependencies": [
{
"name": "vs-yasm",
"platform": "windows"
},
{
"name": "yasm-tool-helper",
"platform": "windows"
}
]
}
3 changes: 2 additions & 1 deletion ports/libvpx/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Source: libvpx
Version: 1.9.0
Port-Version: 2
Port-Version: 3
Homepage: https://github.com/webmproject/libvpx
Description: The reference software implementation for the video coding formats VP8 and VP9.
Supports: !(uwp&arm)
Build-Depends: yasm-tool-helper
9 changes: 5 additions & 4 deletions ports/libvpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ vcpkg_from_github(
HEAD_REF master
)

vcpkg_find_acquire_program(YASM)
vcpkg_find_acquire_program(PERL)

get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)

if(CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}")
set(ENV{PATH} "${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}")
else()
set(BASH /bin/bash)
set(ENV{PATH} "${YASM_EXE_PATH}:${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}")
set(ENV{PATH} "${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}")
endif()

include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(PREPEND_TO_PATH)

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)

file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
Expand Down
3 changes: 2 additions & 1 deletion ports/mpg123/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: mpg123
Version: 1.25.8
Port-Version: 13
Port-Version: 14
Homepage: https://sourceforge.net/projects/mpg123/
Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).
Build-Depends: yasm-tool-helper
6 changes: 3 additions & 3 deletions ports/mpg123/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ vcpkg_from_sourceforge(
0004-add-arm64-uwp-config.patch
)

vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")

include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(APPEND_TO_PATH)

if(VCPKG_TARGET_IS_UWP)
vcpkg_build_msbuild(
Expand Down
2 changes: 1 addition & 1 deletion ports/nettle/CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Version: 3.5.1
Port-Version: 4
Homepage: https://git.lysator.liu.se/nettle/nettle
Description: Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
Build-Depends: gmp, vs-yasm (windows)
Build-Depends: gmp, vs-yasm (windows), yasm-tool-helper (windows)
19 changes: 10 additions & 9 deletions ports/nettle/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ShiftMediaProject/nettle
REF 1d0a6e64e01458fdf37eaf5d90975deb52c3da41 #v3.5.1
REF 1d0a6e64e01458fdf37eaf5d90975deb52c3da41 #v3.5.1
SHA512 6124fbd223e6519d88290c3f4e3b8cc399e038c9c77cfec38e6ab17b075846e662fd0360d62c132c882536489c8a865795f64059e2d2b21467f65d90320e5c39
HEAD_REF master
PATCHES gmp.patch
name.dir.patch
runtime.nettle.patch
runtime.hogweed.patch
)
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_DIR "${YASM}" DIRECTORY)
vcpkg_add_to_path("${YASM_DIR}")

include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
yasm_tool_helper(OUT_VAR YASM)
file(TO_NATIVE_PATH "${YASM}" YASM)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(CONFIGURATION_RELEASE ReleaseDLL)
Expand All @@ -27,7 +28,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
string(APPEND CONFIGURATION_DEBUG WinRT)
endif()

#Setup YASM integration
#Setup YASM integration
set(_file "${SOURCE_PATH}/SMP/libnettle.vcxproj")
file(READ "${_file}" _contents)
string(REPLACE [[<Import Project="$(VCTargetsPath)\BuildCustomizations\yasm.props" />]]
Expand Down Expand Up @@ -62,7 +63,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}")
endif()
file(WRITE "${_file}" "${_contents}")

vcpkg_install_msbuild(
USE_VCPKG_INTEGRATION
SOURCE_PATH ${SOURCE_PATH}
Expand All @@ -73,7 +74,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE}
DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG}
SKIP_CLEAN
OPTIONS /p:UseEnv=True
OPTIONS "/p:YasmPath=${YASM}"
)

get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME)
Expand Down Expand Up @@ -103,12 +104,12 @@ else()
GITLAB_URL https://git.lysator.liu.se/
OUT_SOURCE_PATH SOURCE_PATH
REPO nettle/nettle
REF ee5d62898cf070f08beedc410a8d7c418588bd95 #v3.5.1
REF ee5d62898cf070f08beedc410a8d7c418588bd95 #v3.5.1
SHA512 881912548f4abb21460f44334de11439749c8a055830849a8beb4332071d11d9196d9eecaeba5bf822819d242356083fba91eb8719a64f90e41766826e6d75e1
HEAD_REF master # branch name
PATCHES fix-InstallLibPath.patch
)

if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(OPTIONS --disable-static)
else()
Expand Down
5 changes: 0 additions & 5 deletions ports/vs-yasm/CONTROL

This file was deleted.

23 changes: 23 additions & 0 deletions ports/vs-yasm/fix_paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/yasm.props b/yasm.props
index 06efe7a..10f6309 100644
--- a/yasm.props
+++ b/yasm.props
@@ -6,15 +6,15 @@
<YASMAfterTargets>CustomBuild</YASMAfterTargets>
</PropertyGroup>
<PropertyGroup>
- <YasmPath Condition= "'$(YASMPATH)' == ''">$(VCInstallDir)</YasmPath>
+ <YasmPath Condition= "'$(YasmPath)' == ''">$(VCInstallDir)</YasmPath>
</PropertyGroup>
<ItemDefinitionGroup>
<YASM>
<Preprocessor>0</Preprocessor>
<Parser>0</Parser>
<ObjectFileName>$(IntDir)%(FileName).obj</ObjectFileName>
- <CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(YasmPath)"yasm.exe -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
- <CommandLineTemplate Condition="'$(Platform)' == 'x64'">"$(YasmPath)"yasm.exe -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
+ <CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(YasmPath)" -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
+ <CommandLineTemplate Condition="'$(Platform)' == 'x64'">"$(YasmPath)" -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' != 'Win32' and '$(Platform)' != 'x64'">echo YASM not supported on this platform
exit 1</CommandLineTemplate>
<ExecutionDescription>%(Identity)</ExecutionDescription>
10 changes: 4 additions & 6 deletions ports/vs-yasm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ vcpkg_from_github(
REF deb50d9f18e8461538468339d508cdf240e64897 #v0.5
SHA512 04627546020d33e5ea91f74b09c5ce3b817dce5f6ae4548c3b4148daa82fbd837c81675ac8730d3ca1cdf91fefa8bb23eec76d1bcd02c03dda1203d0c261178d
HEAD_REF master
PATCHES
fix_paths.patch
)

set(_files yasm.props yasm.targets yasm.xml)
foreach(_file ${_files})
file(INSTALL "${SOURCE_PATH}/${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/")
file(INSTALL "${SOURCE_PATH}/${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endforeach()
set(_file "${CURRENT_PACKAGES_DIR}/share/${PORT}/yasm.props")
file(READ "${_file}" _contents)
string(REPLACE "$(VCInstallDir)" "" _contents "${_contents}")
file(WRITE "${_file}" "${_contents}")

configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
8 changes: 8 additions & 0 deletions ports/vs-yasm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "vs-yasm",
"version-string": "0.5.0",
"port-version": 1,
"description": "Provides Visual Studio integration for the YASM assembler.",
"homepage": "https://github.com/ShiftMediaProject/VSYASM",
"supports": "windows & !arm"
}
2 changes: 2 additions & 0 deletions ports/yasm-tool-helper/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
configure_file(${CMAKE_CURRENT_LIST_DIR}/yasm-tool-helper.cmake ${CURRENT_PACKAGES_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake COPYONLY)
12 changes: 12 additions & 0 deletions ports/yasm-tool-helper/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "yasm-tool-helper",
"version-string": "2020-10-12",
"description": "This port provides helper functions for ports needing to consume YASM",
"homepage": "https://github.com/Microsoft/vcpkg",
"dependencies": [
{
"name": "yasm-tool",
"platform": "x86 & windows"
}
]
}
34 changes: 34 additions & 0 deletions ports/yasm-tool-helper/yasm-tool-helper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
function(yasm_tool_helper)
cmake_parse_arguments(PARSE_ARGV 0 a
"APPEND_TO_PATH;PREPEND_TO_PATH"
"OUT_VAR"
""
)

if(CMAKE_HOST_WIN32)
if(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
# Native compilation
set(YASM "${CURRENT_INSTALLED_DIR}/tools/yasm-tool/yasm.exe")
else()
# Cross compilation
get_filename_component(YASM "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/yasm-tool/yasm.exe" ABSOLUTE)
if(NOT EXISTS "${YASM}")
message(FATAL_ERROR "Cross-targetting and x64 ports requiring yasm require the x86-windows yasm-tool to be available. Please install yasm-tool:x86-windows first.")
endif()
endif()
else()
vcpkg_find_acquire_program(YASM)
endif()

if(a_APPEND_TO_PATH)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
vcpkg_add_to_path("${YASM_EXE_PATH}")
endif()
if(a_PREPEND_TO_PATH)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
vcpkg_add_to_path(PREPEND "${YASM_EXE_PATH}")
endif()
if(a_OUT_VAR)
set(${a_OUT_VAR} "${YASM}" PARENT_SCOPE)
endif()
endfunction()
37 changes: 37 additions & 0 deletions ports/yasm-tool/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
vcpkg_fail_port_install(MESSAGE "The yasm-tool port currently only supports Windows" ON_TARGET "Linux" "OSX" ON_ARCH "x64" "arm")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcpkg_fail_port_install(MESSAGE "The yasm-tool port currently only supports Windows" ON_TARGET "Linux" "OSX" ON_ARCH "x64" "arm")
vcpkg_fail_port_install(MESSAGE "The yasm-tool port is only intended to be built for x86 Windows" ON_TARGET "Linux" "OSX" ON_ARCH "x64" "arm")


set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
set(VCPKG_LIBRARY_LINKAGE static)

vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO yasm/yasm
REF 009450c7ad4d425fa5a10ac4bd6efbd25248d823 # 7.0.3 plus bugfixes for https://github.com/yasm/yasm/issues/153
SHA512 a542577558676d11b52981925ea6219bffe699faa1682c033b33b7534f5a0dfe9f29c56b32076b68c48f65e0aef7c451be3a3af804c52caa4d4357de4caad83c
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DENABLE_NLS=OFF
-DYASM_BUILD_TESTS=OFF
)

vcpkg_install_cmake()

vcpkg_copy_tools(TOOL_NAMES yasm)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include")

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
foreach(LICENSE Artistic.txt BSD.txt GNU_GPL-2.0 GNU_LGPL-2.0)
file(COPY "${SOURCE_PATH}/${LICENSE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endforeach()
7 changes: 7 additions & 0 deletions ports/yasm-tool/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "yasm-tool",
"version-string": "2020-10-12",
"description": "A modular assembler. This port is intended to build other ports and should not be used directly.",
"homepage": "http://yasm.tortall.net/",
"supports": "windows & x86"
}
4 changes: 3 additions & 1 deletion scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ $skipList = . "$PSScriptRoot/generate-skip-list.ps1" `
# WORKAROUND: the x86-windows flavors of these are needed for all cross-compilation, but they are not auto-installed.
# Install them so the CI succeeds:
if ($Triplet -in @('x64-uwp', 'arm64-windows', 'arm-uwp')) {
.\vcpkg.exe install protobuf:x86-windows boost-build:x86-windows sqlite3:x86-windows @commonArgs
.\vcpkg.exe install protobuf:x86-windows boost-build:x86-windows sqlite3:x86-windows yasm-tool:x86-windows @commonArgs
} elseif ($Triplet -in @('x64-windows', 'x64-windows-static')) {
.\vcpkg.exe install yasm-tool:x86-windows @commonArgs
}

& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs
Expand Down
7 changes: 7 additions & 0 deletions toolsrc/include/vcpkg/base/files.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@

namespace fs
{
struct IsSlash
{
bool operator()(const wchar_t c) const noexcept { return c == L'/' || c == L'\\'; }
};

constexpr IsSlash is_slash;

#if VCPKG_USE_STD_FILESYSTEM
namespace stdfs = std::filesystem;
#else
Expand Down
Loading