Commit Graph

1845 Commits

Author SHA1 Message Date
ras0219
3f6342db6d
[vcpkg] Fix vcpkg export --nuget regressions (#12174)
* [vcpkg] Upgrade find_acquire_program(NUGET) to 5.5.1. Add partial SHA to temporary download paths to avoid collisions.

* [vcpkg] Fix regression in `vcpkg export --nuget` due to file locking on .vcpkg-root

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-30 14:02:26 -07:00
nicole mazzuca
1d8f0acc9c
[vcpkg manifest] Manifest Implementation (#11757)
==== Changes Related to manifests ====

* Add the `manifests` feature flag
  * This only says whether we look for a `vcpkg.json` in the cwd, not
    whether we support parsing manifests (for ports, for example)
* Changes to the manifests RFC
  * `"authors"` -> `"maintainers"`
  * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags`
  * reserve `"core"` in addition to `"default"`, since that's already
    reserved for features
  * Add a small helper note about what identifiers must look like
  * `<license-string>`: SPDX v3.8 -> v3.9
  * `"feature"."description"` is allowed to be an array of strings as well
  * `"version"` -> `"version-string"` for forward-compat with versions
    RFC
* Add the `--feature-flags` option
* Add the ability to turn off feature flags via passing
  `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags`
* Add CMake toolchain support for manifests
  * Requires either:
    * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}`
      or `VCPKG_FEATURE_FLAGS`
    * Passing the `VCPKG_ENABLE_MANIFESTS` option
  * The toolchain will install your packages to
    `${VCPKG_MANIFEST_DIR}/vcpkg_installed`.
* Add MSBuild `vcpkg integrate install` support for manifests
  * Requires `VcpkgEnableManifest` to be true
* `vcpkg create` creates a port that has a `vcpkg.json` instead of a
  `CONTROL`
* argparse, abseil, 3fd, and avisynthplus ports switched to manifest
  from CONTROL
* Add support for `--x-manifest-root`, as well as code for finding it if
  not passed
* Add support for parsing manifests!
* Add a filesystem lock!

==== Important Changes which are somewhat unrelated to manifests ====

* Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}`
* Add `PlatformExpression` type which takes the place of the old logic
  expression
  * Split the parsing of platform expressions from checking whether
    they're true or not
  * Eagerly parse PlatformExpressions as opposed to leaving them as
    strings
* Add checking for feature flag consistency
  * i.e., if `-binarycaching` is passed, you shouldn't be passing
    `--binarysource`
* Add the `Json::Reader` type which, with the help of user-defined
  visitors, converts JSON to your internal type
* VcpkgArgParser: place the switch names into a constant as opposed to
  using magic constants
  * In general update the parsing code so that this ^ works
* Add `Port-Version` fields to CONTROL files
  * This replaces the existing practice of
    `Version: <my-version>-<port-version>`

==== Smaller changes ====
* small drive-by cleanups to some CMake
  * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` ->
    `${CURRENT_INSTALLED_DIR}`
  * Remove `-analyze` when compiling with clang-cl, since that's not a
    supported flag (vcpkg's build system)
  * Add a message about which compiler is detected by vcpkg's build
    system machinery
* Fix `Expected::then`
* Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a
  `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`)
* Add `Strings::strto` which converts strings to numeric types
* Support built-in arrays and `StringView` for `Strings::join`
* Add `operator<` and friends to `StringView`
* Add `substr` to `StringView`
* SourceParagraphParser gets some new errors
2020-06-30 10:40:18 -07:00
ras0219
d47570b8d6
[vcpkg-x-set-installed] Implement --dry-run (#12132)
* [vcpkg-x-set-installed] Implement --dry-run

* [vcpkg] Address code review comments

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-27 09:50:01 -07:00
Billy O'Neal
81ae2ed94b
[vcpkg] Add write-only binary caching for CI. (#12130)
Changes to the binary caching spec made as comments over at https://github.com/microsoft/vcpkg/pull/11204#pullrequestreview-438518901
2020-06-26 12:37:53 -07:00
Billy O'Neal
309f6fc9bc
[vcpkg] Delete unused --purge-tombstones and introduce BufferedPrint class (#12049)
* Introduce buffered_print class to manage buffered write patterns like in the ci command.

* Remove --purge-tombstones option.

* Law of demeter.

* Make buffered_print imobile.

* buffered_print => BufferedPrint

* Fix merge conflict.
2020-06-26 12:16:17 -07:00
ras0219
91e798afd8
[vcpkg] Implementation of --x-binarysource=nuget (and friends) (#12058)
* [vcpkg] Initial implementation of --x-binarysource=nuget

* [vcpkg] Remove double-double quoting of CMake arguments

* [vcpkg] Update nuget.exe to 5.5.1 to support Azure DevOps Artifacts

* [vcpkg] Enable batching of NuGet server calls with prefetch(). Add `interactive` binarysource.

* [vcpkg] Add `nugetconfig` binary source

* [vcpkg] Short circuit querying remote NuGet servers once all refs are found

* [vcpkg] Add experimental help for binary caching

* [vcpkg] Improved NuGet cache package descriptions and version formatting

* [vcpkg] Rename `CmdLineBuilder::build()` to extract()

* [vcpkg-help] Ascii-betize help topics

* [vcpkg] Add tests for cmdlinebuilder. Improve handling of quotes and slashes.

* [vcpkg] Addressing code review comments

* [vcpkg] Add tests for vcpkg::reformat_version()

* [vcpkg] Added test for vcpkg::generate_nuspec()

* [vcpkg] Add tests for vcpkg::XmlSerializer

* [vcpkg] Addressed code review comment

* [vcpkg] Add test for vcpkg::Strings::find_first_of

* [vcpkg] Fix machine-specific paths in test for vcpkg::generate_nuspec()

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 12:16:02 -07:00
ras0219
7ebb42a4d9
[vcpkg] Fix "[commands-build] build smoke test" (#12128)
* [vcpkg] Fix "[commands-build] build smoke test"

1. Do not exit with a success code in Build::perform, because this causes failures in other tests to be ignored.
2. Use temp directory to avoid interference with the current set of {installed, buildtrees, packages}
3. Explicitly disable binary caching

* [vcpkg] Disable binarycaching in "build smoke test", "[commands-build]"

Return 1 for the last failure case in Build::perform() so testing may continue.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 11:35:41 -07:00
ras0219
4c527e49c4
[vcpkg] Use XDG/LOCALAPPDATA for default binary caching path (#12091)
* [vcpkg] Use XDG Base Directory Specification on non-Windows

* [vcpkg] Move user-wide binary cache on Windows to $LOCALAPPDATA/vcpkg/archives

* [vcpkg] Address code review comments; refactor other uses of LOCALAPPDATA

* [vcpkg] Address code review comments

* [vcpkg] filesystem::path::append() accepts string arguments, not paths.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 11:26:38 -07:00
nicole mazzuca
22c8e3a23a
[vcpkg build] fix build command (#12072) 2020-06-25 18:23:30 -07:00
Billy O'Neal
0d37525d75
[vcpkg] Commonize pipelines build powershell and don't use binary caching in CI (rather than PR) builds (#12082) 2020-06-25 16:36:28 -07:00
ras0219
aef838536e
[vcpkg] Track compiler information in ABI (#11654)
* [vcpkg] Refactor out abi_tags_from_pre_build_info()

* [vcpkg] Track Windows toolchain file in triplet hash

* [vcpkg] Improve error messages when constructing PreBuildInfo

* [vcpkg] Extract InstallPlanAction::BuildAbiInfo

* [vcpkg] Extract Build::EnvCache and private-impl VcpkgPaths

* [vcpkg] Enable compiler hash detection when binarycaching is enabled

* [vcpkg] Downgrade warning about missing ABI keys

When binarycaching is not enabled, this warning is spurious and provides no user value.

* [vcpkg] Cleanup

* [vcpkg] Refactor compiler tracking into triplet abi computation

Move several static global caches into VcpkgPaths/EnvCache.
Add feature flag 'compilertracking' to enable the new feature.

* [vcpkg] Refactor out PreBuildInfo::using_vcvars()

Move VcpkgTripletVar into build.cpp because it is not used outside that file.

* [vcpkg] Address some code analysis warnings

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-22 14:14:36 -07:00
Vitalii Koshura
de44a808e0
Put user-defined configuration triplets path on top of the search queue (#11931)
I believe that user-defined configuration triplets paths should be the first when searching for triplet configuration.
This commit puts user-defined configuration triplets (if defined) on top of the search queue before standard paths.
This could help to overwrite default tiplet configuration without setting custom triplet.

P.S. If current implementation is better than my suggestion, feel free to ignore this commit.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-06-18 15:53:58 -07:00
ras0219
4cbbf4ebe6
[vcpkg] Fix issue #9781 by exporting from the installed directory (#11015)
* [vcpkg] Fix issue #9781 by exporting from the installed directory

* [vcpkg] Address code review comments for #11015

* [vcpkg] Remove duplicate triplet in installed path from exports

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-17 12:32:05 -07:00
Billy O'Neal
04e214eb0e
[vcpkg] Fix create by extracting common paths settings (#11842)
Resolves #11784
2020-06-16 11:58:11 -07:00
Billy O'Neal
7192d3affa
[vcpkg] Delete g_binary_caching global that should be passed as a parameter. (#11958) 2020-06-15 14:34:26 -07:00
Alexander Neumann
14514508d8
[vcpkg] Add vcpkg item to project settings in Visual Studio (#4361)
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-15 14:24:14 -07:00
Billy O'Neal
9efc1318dd
[vcpkg] Fix bootstrap on VS2015 (#11891)
* Fix boostrap on VS2015 by removing use of C++17 constexpr lambdas.
2020-06-11 17:47:18 -07:00
Billy O'Neal
1d3e985e4f
[vcpkg] Fix OSX CI by ensuring the downloads directory exists (#11839)
* [vcpkg] Remove do-nothing Set-Content from Windows azure-pipelines.yml.
* [vcpkg] Fix OSX CI by ensuring the downloads directory exists in advance, and extract common command line parameters with powershell splatting.
* [tensorflow-cc] Prevent hang building tensorflow-cc asking to configure iOS.
* Skip ignition-msgs5:x64-osx
2020-06-08 22:46:18 -07:00
Billy O'Neal
4fb2256085
[vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links (#11483) 2020-06-03 19:31:28 -07:00
Mohammed Alyousef
a6257ac262
[vcpkg] add x86-wasm.cmake to community triplets (#11323)
* add x86-wasm.cmake to community triplets

The EMSDK enviroment variable is normally defined when first installing Emscripten.

* Rename x86-wasm.cmake to wasm32-emscripten.cmake

* Update wasm32-emscripten.cmake

* Update wasm32-emscripten.cmake

* Add wasm32 and wasm64 arch to docs

* Create wasm64-emscripten.cmake

* remove wasm64

* Delete wasm64-emscripten.cmake

* Add wasm32 to list of identifiers

* add emscripten VCPKG_CMAKE_SYSTEM_NAME support

* add path check to EMSDK cmake toolchain
2020-06-02 16:07:41 -07:00
Billy O'Neal
cc4f93f434
[vcpkg] Rename the msbuild property VcpkgRoot to VcpkgCurrentInstalledDir, and set VcpkgRoot to the expected root instead. (#11653) 2020-05-29 16:38:03 -07:00
nicole mazzuca
09319cd79e
[vcpkg metrics] Allow someone to opt out after build (#11542)
* [vcpkg metrics] start using json library

Additionally, add floats to the JSON library since they're required.

* [vcpkg metrics] allow users to disable metrics after the build

Additionally, as a drive by, fix UUID generation

* fix metrics data

* code review
2020-05-29 14:09:03 -07:00
Billy O'Neal
d9b4acf02d
[vcpkg] Move CI cleaning back out of the 'ci' command into a separate command to restore cross-compilation preinstalls. (#11545) 2020-05-27 18:40:23 -07:00
nicole mazzuca
9d9a50bc98
[vcpkg] fix extern C around ctermid (#11343)
Additionally, move the system_header invocations to their own header file,
<vcpkg/base/system_header.h>
2020-05-20 10:10:26 -07:00
Billy O'Neal
0116b86e38
[vcpkg] Optimize string split slightly. (#11433) 2020-05-19 15:05:53 -07:00
Jack·Boos·Yu
f23ebed76f
[cmake] Update to 3.17.2 (#10767)
* [cmake] Update to 3.17.1

* update cmake directory name

* [cpuid] Fix install headers.

* [stormlib] Fix install headers

* [murmurhash] Fix install headers

* [metrohash] Fix install headers

* update baseline

* update baseline

* [otl] update hash

* update baseline

* [gts] Do not use ninja to avoid empty implib issue

* update baseline

* [dmlc] Re-trigger ci test

* [replxx] Re-trigger ci test

* update baseline

* [osg] Re-trigger ci test

* [replxx] Fix build failure

* Set cmake min version to 3.17.1

* update baseline

* [libnice] Re-trigger ci test

* [mlpack] Re-trigger ci test

* update to 3.17.2

* update cmake hash

* update baseline

* update baseline

* update baseline

* update baseline

* Update scripts/ci.baseline.txt

Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>

* update baseline

* update baseline

* [magnum] Set magnum:arm64-windows to skip in baseline

* [nanogui] Set nanogui:arm64-windows to fail in baseline

* [nettle] Set nettle:x64-windows to fail, waiting for fix this issue in another PR

* re-trigger CI test

* update baseline

* Install unixODBC in Linux

* [nanodbc] Re-trigger CI test

* update baseline

* Remove space

* update baseline
2020-05-19 14:47:19 -07:00
Billy O'Neal
3b0080e3b0
[vcpkg] Harden file removals and clean directory contents in "CI" inside vcpkg itself. (#11432)
`files.h/files.cpp`:
* Add end and else comments to all macros.
* Add "remove_all_inside" function which empties a directory without actually deleting the directory. This is necessary to handle the case where the directory is actually a directory symlink.
* Change remove_all to use std::remove when VCPKG_USE_STD_FILESYSTEM is set; this will engage POSIX delete support available on current Win10.

`commands.ci.cpp`: empty "installed".

`*/initialize_environment.*`: No longer clean the directories outside the tool.

`ci-step.ps1`: Remove unused console output tee-ing.
2020-05-19 13:43:30 -07:00
Billy O'Neal
0e9e59f2c4
[vcpkg] Hardem expand environment strings path with explicit integer overflow checks and resistance to CP_ACP. (#11315) 2020-05-18 12:48:09 -07:00
Markus Rickert
47e9a1d1c1
[vcpkg] msbuild: do not build vcpkgmetricsuploader when -disableMetrics (#11368) 2020-05-18 11:05:23 -07:00
Billy O'Neal
8a583e80da
[vcpkg] Avoid naming Policheck sensitive term 'Virgin Islands' (#11339) 2020-05-15 22:38:39 -07:00
Billy O'Neal
5504dfa7da
[vcpkg] Turn on tests and PREfast in CI, and fix tests to pass. (#11239)
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-14 12:49:31 -07:00
shihaonan369
4727bc86a4
[vcpkg] Fix nuget package import failed. (#11093)
* fix bug that caused exported nuget package import failure.

* Give priority to nuget package to set $(VcpkgRoot).

* [vcpkg] Remove trailing whitespace

* fix nuget package import failed

Co-authored-by: 施浩男 <shihaonan@zhongli360.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-05-13 23:37:15 -07:00
nicole mazzuca
6c159b7766
[vcpkg] Hopefully fix build on macOS 10.13/10.14 (#11205) 2020-05-11 16:31:04 -07:00
Tobias Funk
06c647e11a
[vcpkg] Resolve --overlay-ports is only working for relative parths since fix… (#11302)
* Resolve --overlay-ports is only working for relative parths since fix for https://github.com/microsoft/vcpkg/issues/10771
Fixes https://github.com/microsoft/vcpkg/issues/11301

* use auto instead of fs::path
2020-05-11 14:54:47 -07:00
Arsen Tufankjian
644ba5d998
[vcpkg] Adding support for finding VS2019 by environment variable (#10760)
* Fixing build with VS2019

* Added support for finding VS2019 by VS160COMNTOOLS env var

* [vcpkg] Explicitly handle trailing backslash in VS140 path.

* [vcpkg] Defer instance validation for VS160COMNTOOLS

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-05-08 12:43:30 -07:00
Robert Schumacher
8de3f323dc
[vcpkg] Resolve relative overlay ports to the current working directory. (#11233)
Fixes #10771.
2020-05-08 12:41:44 -07:00
Billy O'Neal
5db4f98d6e
Don't build the metrics uploader when metrics are disabled. (#11234) 2020-05-08 00:16:49 -07:00
Billy O'Neal
d7d410b50b
[vcpkg] Restrict telemetry uploads to TLS 1.2 (#11213)
* [vcpkg] Restrict telemetry uploads to TLS 1.2, as required by Azure security policy.

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-07 14:20:14 -07:00
nicole mazzuca
eb8efe7ca5
[vcpkg] always pass VSCMD_SKIP_SENDTELEMETRY=1 (#11202)
Fixes #10468
2020-05-06 15:56:47 -07:00
nicole mazzuca
46bf8c52cb
[vcpkg] fix bug in Filesystem::absolute (#11170)
* [vcpkg] fix bug in Filesystem::absolute

* flip the conditional for billy
2020-05-04 15:25:38 -07:00
Robert Schumacher
3ae3bd3445
[vcpkg] Warn on unmatched removal with reasonable alternative (#11083) 2020-04-30 09:43:55 -07:00
Robert Schumacher
9b91a53606
[vcpkg] Correctly record default feature list in BinaryParagraphs. Fixes #10678. (#11085) 2020-04-29 15:09:55 -07:00
Martin Hořeňovský
6ef805c2a9
[vcpkg] Small touchups for vcpkg unit tests (#11068)
* Do not disable expression decomposition in some optional tests

The tests are trivial enough that it is unlikely to come useful,
but the old usage is bad practice.

* Run tests in random order

This should prevent committing tests that are run-order dependent,
or at least shake them out eventually in CI.
2020-04-29 12:00:50 -07:00
Robert Schumacher
ce8b01a14b
[vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (#10476)
* [vcpkg] Add support for VCPKG_BINARY_SOURCES and --binarysource=<>

* [vcpkg] Rename --binarysource to --x-binarysource to denote internal/experimental

* [vcpkg] Address review comments & add tests for BinaryConfigParser

* [vcpkg] Replace do {} while(1); with for(;;)

Avoids conditional expresion is constant warnings

* [vcpkg] Invert if/else

* [vcpkg] Fix warning in export.prefab.cpp

* [vcpkg] Resolve merge regressions
2020-04-29 10:16:40 -07:00
NancyLi1013
6709d3d7d0
[vcpkg] Fix toolsrc CMake build error (#10973) 2020-04-23 14:07:12 -07:00
nicole mazzuca
09af1e9b55
[vcpkg] Add initial JSON support (#10521)
* [vcpkg] Add initial JSON support

This adds a JSON parser, as well as the amount of unicode support
required for JSON parsing to work according to the specification. In the
future, I hope to rewrite our existing XML files into JSON.

Additionally, as a drive-by, we've added the following:

* add /wd4800 to pragmas.h -- this is a "performance warning", for when
  you implicitly convert pointers or integers to bool, and shouldn't be
  an issue for us.
* Switched Parse::ParserBase to read unicode (as utf-8), as opposed to
  ASCII
* Building again under VCPKG_DEVELOPMENT_WARNINGS, yay!
2020-04-17 18:16:20 -07:00
nicole mazzuca
556325a1f7
[vcpkg] Add x-set-installed command (#10817)
This command takes a list of ports, and causes the final state of the
installed directory to be as-if one ran the install on an empty
installed directory (removing any unnecessary packages).

This is especially useful with the new `--x-install-root` option, which
allows one to set the `installed` directory for vcpkg to use.

Additionally, as a drive-by, we do some `stdfs` clean-up and add a
`.is_feature()` member function to BinaryParagraph (as opposed to
checking for `.feature().empty()`, which is far less clear to read).

This feature is experimental.
2020-04-17 15:49:59 -07:00
nicole mazzuca
12d75a13ac
[vcpkg] Fix build scripts on openSUSE and g++9 (#10867)
The existing code did not correctly pass `CXX` to cmake.
2020-04-17 10:56:27 -07:00
nicole mazzuca
22623e3501
[vcpkg] Clean up CMake build system (#10834)
There are quite a few changes to the CMake build system packaged up into
one set here:
* Added `toolsrc/cmake/utilities.cmake`, which contains the following:
  * `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one
    of {gcc, clang, msvc}
  * `vcpkg_detect_standard_library` -- get the name of the standard
    library we're linking to, as one of {libstdc++, libc++, msvc-stl}
  * `vcpkg_detect_std_filesystem` -- figure out how to link and call
    into C++17's filesystem; whether one needs to link to `stdc++fs` or
    `c++fs`, and whether to use `<filesystem>` or
    `<experimental/filesystem>`.
* Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from
  `VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development
  warnings without passing -Werror
* Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the
  former will now print a deprecation message and set the latter.
* Now, print a deprecation message on `WERROR`; it doesn't do anything
  since the behavior it requested is now the default.
* Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z`
* Do some code movement
* Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW
  * Renamed to `VCPKG_USE_STD_FILESYSTEM`

Additionally, we now pass `/W4` in Debug mode on x86 in the Visual
Studio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.

And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.
2020-04-14 22:08:50 -07:00
Alexander Neumann
0edffcf125
[vcpkg] New policy: SKIP_ARCHITECTURE_CHECK. (#10398)
* New policy: SKIP_DLL_ARCHITECTURE_CHECK.
The check only works if MS link.exe is used
otherwise the second linker member is missing
(according to the observed errors)

* rename to VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK
since the dll check was ok but the lib check was failing.

* fix indentation

* move the if to a better position.
2020-04-09 17:04:20 -07:00
nicole mazzuca
1448db9d6f
[vcpkg-test] Fix the check for ability to make symlinks (#10543)
The old check checked to see if the computer was in developer mode _OR_ allowed sideloading apps, but we want _only_ developer mode.
2020-04-09 16:33:36 -07:00
nicole mazzuca
47a4913834
[vcpkg] Correct UInt128 code 😇 (#10583)
* [vcpkg] Correct UInt128 code 😇

`UInt128::operator<<(x, y)` should clear the bottom 64 bits of `x` if
`y >= 64`; however, we don't do this, and so we duplicate `x`'s bottom
bits into `x.top` instead of moving them. Similarly, we have the
opposite problem for `UInt128::operator>>`. This commit fixes these
latent bugs, which we weren't hitting because the thing we use them for
never actually shifts more than 64 bits.
2020-04-09 14:11:53 -07:00
atkawa7
52b5dfd2ef
Android Support: Exporting to Android Archive (AAR) (#10271)
* added android triplets

* added android support to vcpkg

* added export directories to git ignore

* fix libraries naming

* added vckpg sources to visual studio project files

* rename file location

* issue with std::string fs:path copy initialization

* format path on VStudio

* fix checks format cannot work on fs::path

* support header only libraries

* support using architecture instead of triplets

* added prefab support

* added debug logs and prefab debug flag

* added support for empty packages i.e openssl
2020-04-06 14:36:17 -07:00
Phoebe
8782b0b8b9
[vcpkg] Fix spec instance name (#10660)
* [vcpkg] Fix spec instance name

* Change cub version for testing the changes

* Add vulkan-hpp to test
2020-04-03 09:41:36 -07:00
Marc Boucek
e1fc03c474
vcpkg_from_git: Add support for git over ssh (#9446)
* vcpkg_from_git: Add support for git over ssh

* vcpkg_from_git: append ssh bin directory to path

* vcpkg_from_git: fix function signature on non windows platforms

* Revert "vcpkg_from_git: fix function signature on non windows platforms"

This reverts commit 0d608ee591.

* Revert "vcpkg_from_git: append ssh bin directory to path"

This reverts commit 377ce3fae1.

* Partial Revert "vcpkg_from_git: Add support for git over ssh"

This partially reverts commit 9b81b16c4c.

Co-authored-by: Marc Boucek <marc.boucek@native-instruments.de>
Co-authored-by: Marc Boucek <marc.boucek@posteo.net>
2020-04-01 07:35:38 -07:00
Alexander Neumann
aeffa625e5
[vcpkg] Add the possibility to load vcvars.bat with external toolchain. (#10399)
* Add VCPKG_LOAD_VCVARS_ENV
allow loading vcvars.bat if an external toolchain file is used.

* add documentation
2020-03-27 20:19:53 -07:00
Robert Schumacher
42ad12f91d
[vcpkg] Improve common case of ignoring filesystem errors (#10557) 2020-03-25 15:18:10 -07:00
Robert Schumacher
2fc82f6381
[vcpkg-help] Reflow and small cleanups (#10477) 2020-03-25 10:50:27 -07:00
Robert Schumacher
8b201cb43c
Merge pull request #10372 from ras0219-msft/dev/roschuma/jobs
[vcpkg] Introduce Job Objects to improve ctrl-c performance on Windows
2020-03-19 17:15:54 -07:00
Robert Schumacher
2c2e67f35f
Merge pull request #10032 from ras0219-msft/dev/roschuma/compute-all-abis
[vcpkg] Compute ABIs upfront instead of just-in-time
2020-03-19 11:50:15 -07:00
Robert Schumacher
4bf1cf35ba [vcpkg] Fill in feature lists during CI reporting 2020-03-18 12:18:24 -07:00
Robert Schumacher
44b9703a81 [vcpkg] Move package abi access after they have been computed 2020-03-18 11:48:33 -07:00
Robert Schumacher
090e7f8e76 [vcpkg] Write abi information to generated test results 2020-03-18 11:20:13 -07:00
Robert Schumacher
ebf8213945 [vcpkg] Use enum class for RestoreResult 2020-03-18 11:19:25 -07:00
Robert Schumacher
26949af8f8 [vcpkg-env] Restore previous behavior of cmd /c <arg> 2020-03-17 13:11:36 -07:00
Billy O'Neal
31cca07563
[vcpkg] Implement a warning when running in a mismatched Visual Studio prompt 2020-03-16 11:19:55 -07:00
Robert Schumacher
e2efb82aa8 [vcpkg] Fix build for non-windows 2020-03-13 21:00:21 -07:00
nicole mazzuca
42fa9b0c0b
[vcpkg] Fix tool lookup without which (#10375)
On Linux and macOS, if `which` is not installed (notably in Amazon's
amazonlinux docker base image), vcpkg fails to find system-installed
versions of tools. This is an issue when we don't attempt to install our
own versions of the tools, like with git (we fail to find any version of
git, and thus can't install any ports which come from a git repository).

Fixes #9927
2020-03-13 13:14:38 -07:00
Billy Robert O'Neal III
3cb8570203 Reorder []s. 2020-03-12 14:40:38 -07:00
Billy Robert O'Neal III
52214665b2 Add "vcvarsall" support. 2020-03-10 23:58:58 -07:00
Billy Robert O'Neal III
347d8ef530 Implement a warning when running vcpkg inside a developer command prompt if the set of packages to install all target a different architecture than the prompt. 2020-03-10 23:44:48 -07:00
Robert Schumacher
60cd1202d9 [vcpkg] Introduce Job Objects to improve ctrl-c performance on Windows 2020-03-10 10:27:36 -07:00
shihaonan369
264982215c
[vcpkg-export-nuget] Fix a import bug of nuget package, give priority to nuget package to set $(VcpkgRoot). (#6214)
* fix bug that caused exported nuget package import failure.

* Give priority to nuget package to set $(VcpkgRoot).

* [vcpkg] Remove trailing whitespace

Co-authored-by: 施浩男 <shihaonan@zhongli360.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-03-10 10:05:39 -07:00
miseri
2eed725614
[vcpkg] Added command line switch --all-installed to allow exporting of all packages without needing to specify individual packages (#10304)
* Added command line switch --all-installed to allow exporting of all packages without needing to specify individual packages

* Changed --all-installed to --x-all-installed https://github.com/microsoft/vcpkg/pull/10304

* [vcpkg] Clang-format export.cpp

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-03-10 10:03:23 -07:00
Robert Schumacher
6b55c62144 Merge remote-tracking branch 'origin/master' into HEAD 2020-03-09 09:19:05 -07:00
Jack·Boos·Yu
8241578dbf
Fix log write failure when installing port for the first time (#10287) 2020-03-03 09:37:49 -08:00
Robert Schumacher
f6d52648ec
[vcpkg] Fix issue #9916; vcpkg upgrade did not load_tag_vars() (#10202) 2020-02-24 14:38:51 -08:00
Victor Romero
ef60f1d9b9
Fix build for VS2015 (#10126)
* Add missing constructors for TexRowCol required by VS2015

* Make TextRowCol() constexpr and noexcept
2020-02-19 16:51:09 -08:00
Robert Schumacher
0ebb462870
[vcpkg] Record output from build process into log file (#10063) 2020-02-13 21:11:01 -08:00
Robert Schumacher
e21400c7ca [vcpkg] Fix VS2015 compile 2020-02-12 15:50:39 -08:00
Victor Romero
b9273daa20 Add binarycaching.(h|cpp) to project files 2020-02-12 14:25:47 -08:00
Robert Schumacher
3d841c9b6a [vcpkg] Compute all ABIs upfront instead of during build_package() 2020-02-11 23:52:56 -08:00
Robert Schumacher
b9942d0744 [vcpkg] Extract binary caching functionality into separate interface 2020-02-11 18:41:03 -08:00
Robert Schumacher
411b4cc8a0 [vcpkg] Remove superfluous BuildPackageConfig struct (#9997)
BuildPackageConfig held essentially the same information as InstallPlanAction, so deduplicate
2020-02-09 18:55:49 -08:00
Robert Schumacher
a33044c186
[vcpkg] Track parser row/col state in Paragraph (renamed from RawParagraph) (#9987) 2020-02-09 14:50:26 -08:00
Robert Schumacher
f7fb56decd [vcpkg] Use CreateProcess on Windows. Improve EnvVars manipulation and handling. (#9897)
* [vcpkg] Rewrite process spawning on windows to always use CreateProcess, enabling better environment handling

* [vcpkg] Use environment cache to avoid calling vcvars multiple times

* [vcpkg] Increase buffer size while computing hashes

* [vcpkg] Remove unneeded cmd.exe wrapper process on all CreateProcess calls

* [vcpkg] Fix .vcxproj{,.filters}

* [vcpkg] Upgrade Ctrl-C state machine to handle multiple background processes.

* [vcpkg] Fix regression while launching metrics: 'start' can't be passed directly to CreateProcessW

* [vcpkg] Fix typo on non-Windows

* [vcpkg] Fix various uses of >NUL across the code

* [vcpkg] Fix various uses of >NUL across the code
2020-02-08 22:45:36 -08:00
Robert Schumacher
8db6db5dac
[vcpkg] Further parser improvements (#9895)
* [vcpkg] Consolidate several internal parsers together (packagespecs + logicexpression + control) and enhance error messages

* [vcpkg] Migrate Build-Depends parsing to new framework

* [vcpkg] Fix tests. Re-enable underscores in feature names due to libwebp[vwebp_sdl] -- todo: rename this feature and remove underscores.
2020-02-07 11:24:35 -08:00
Robert Schumacher
5affb590fd
Merge pull request #9901 from Neumann-A/skip_dumpbin
[vcpkg] Add policy VCPKG_POLICY_SKIP_DUMPBIN_CHECKS
2020-02-06 15:41:38 -08:00
Robert Schumacher
5162592a3a [vcpkg] Improve error messages when failing to find a backing port 2020-02-06 14:40:28 -08:00
Alexander Neumann
d12f839d2e
[vcpkg] fix missing " around path include (#9912)
* fix missing " around path

* Update VERSION.txt

* [vcpkg] Add quotes to include() in generated dep info file

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-02-05 11:23:36 -08:00
Alexander Neumann
877ebc4324
Move " to correct position
and change copyright copy to use configure_file
2020-02-05 08:59:05 +01:00
Alexander Neumann
9298dec358
rename string variable to NAME_SKIP_DUMPBIN_CHECKS 2020-02-04 20:36:54 +01:00
Alexander Neumann
bd8c07217a [vcpkg] Add skip dumpbin checks
and correct some cmake advices.
Paths should always be handled with "${PATH}" due to possible spaces
2020-02-04 10:58:38 +01:00
Phil Christensen
e62d136128
[vcpkg] Add Supports: field. Use contents of triplets instead of names for dependency resolution. (#8601)
* remove unfinished "supports" tag

* extract "supports" from control files
But do nothing with the value

* Start `Supports` documentation

* Use Supports in a bunch of control files

I only tried matching the already existing logic in the portfile.cmake.

* Cmake var provider (#8)

* Cmake var provider (#9)

* fix windows build (#10)

* Add missing files to build

* Fix test (#11)

* adding hooks for cmake variables in expressions

* Adding hooks for 'supports' in CI test

* Fix test (#12)

* Add overrides to evaluation environment

* use "supported" tag in CI testing

* cleanup comment

* Fix issues with PR

* [var_provider] Get library linkage variables from triplet

* Fix compilation errors in tests

* Add unimplemented functions

* Fix unit tests part 1

* Fix issue when buildtrees dir does not exist

* Change binary output hash

* Fix handling of * feature

* Add core feature when using *

* Do not add Default-Features when installing 'core'

* [vcpkg] WIP. 6 failing tests.

* [vcpkg] WIP. 1 failing tests.

* [vcpkg] WIP. 0 failing tests.

* [vcpkg] Removed 'remove_graph'. 0 failing tests.

* [vcpkg] Removed 'install_graph'. 0 failing tests.

* [vcpkg] Remove AnyAction; replace with ActionPlan

* [vcpkg] Minor cleanup.

* [vcpkg][z3][qt5-connectivity][qt5-purchasing] Improve error messages while parsing. Fix a few trivial port issues.

* [vcpkg] Work around ICE with MSVC v140

* [vcpkg] Add purge on fail to decompress for CI

* [vcpkg] Fix parsing of nested parentheses in qualifiers

* [vcpkg] Fix Linux builds (explicit qualification in declaration)

* [vcpkg] Fix Build-Depends implying default features. Fix qualified dependencies regression.

* [mmx] Add to skip list and full rebuild -- mmx causes problems by installing 'sched.h'

* [libpqxx][mqtt-cpp] Prevent installing include/CMakeLists.txt

* [cppitertools] Fix installed include namespace (should be include/cppitertools)

* [libsoundio] Move headers into soundio/ subdirectory as per original cmake

* [ci.baseline] Temporarily skip charls due to conflict with dcmtk

* [vcpkg] Add restricted include files post build check -- bump global abi version

* [libsoundio] Hotfix stray line in portfile

* [vcpkg] Fix regression: CMake information was not being displayed for build-and-install actions

* [jsonnet] Fix installation of internal headers; use system nlohmann-json

* [grpc][upb] Teach grpc to use packaged upb. Add find_package(upb). Remove inappropriate upb features.

* [zfp] Move problematic 'include/bitstream.h' to 'include/zfp/bitstream.h'

* [x265] Bump control version to trigger rebuild after zfp conflict

* [akali] Disable parallel configure

* [dirent][dlfcn-win32][getopt-win32][pthreads] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS

* [ci.baseline] Update baseline for improved upb support

* [tgui] Disable parallel configure

* [libiconv] Enable VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS

* [aws-sdk-cpp] Disable parallel configure

* [vcpkg] Implement policy VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS

* [aws-sdk-cpp] Fix amount of escaping semicolons -- Note: I do not know the root cause requiring this change

* [libodb-sqlite] Fix configuring into source directory

* [gettext] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS

* [libodb] DISABLE_PARALLEL_CONFIGURE

* [vcpkg] Add 'config.h' and 'local.h' to restricted header list

* [mcpp] Remove unused and problematic include 'config.h' from installed files

* [teemo] Move installed headers into subdirectory to prevent conflicts with x265

* [ci.baseline] Update current OSX. Skip libmesh on all platforms due to heavy conflicts.

* [vcpkg] Add 'slice.h' as a restricted header

* [osg] Improve accuracy of dependencies (disable some, add some to Depends)

* [vcpkg] Skip invoking a subprocess for 0 specs in load_tag_vars

* [ci.baseline] Skip mongo-c-driver on osx due to flakiness

* [teemo] Fix incorrect include file read

* [osg] Fix dependency typo: glut -> freeglut

* [vcpkg] Recover some lost performance with the addition of vcpkg_get_tags.

A huge performance cost was loading the triplet files over and over; instead, we splice the sources into a macro and load it once, then just call that macro for each port.
Remove use of hashing because we aren't cross-process-safe anyway (global static will do instead).

* [vcpkg] Change Supports atom 'windows' to include UWP. Improve Supports field documentation.

* [vcpkg] Add docs for VCPKG_ENV_PASSTHROUGH and VCPKG_DEP_INFO_OVERRIDE_VARS

* Fix typo

Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-02-03 14:22:52 -08:00
Cristian Adam
38b959022c Add support for building with MinGW (#9137)
* Add support for building with MinGW

Tested with MSYS2 MinGW 8.3.0, gcc-mcf.lhmouse MinGW 9.2.1,
and StephanTLavavej/mingw-distro!

* Add MinGW toolchain

From your MinGW configured shell you could just use vcpkg to
configure packages.

An x64-mingw triplet would look like:
```
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_ENV_PASSTHROUGH PATH)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)
```

* Add MinGW community tripplets

x64 tested with https://github.com/StephanTLavavej/mingw-distro
x86, arm64, arm tested with https://github.com/mstorsjo/llvm-mingw
2020-01-17 15:36:08 -08:00
Victor Romero
f56645c3fd
Community Triplets 🤝 (#7976)
* Move untested triplets to Community Triplets

* Document community triplets

* Load community triplets by default and alert when using one

* [triplets] Merge documentation of community triplets

* Bump version
2020-01-17 14:21:19 -08:00
Kristof
24a97b16e7 [toolsrc] Added missing @ to FATAL_ERROR message (#9720)
To install a specific version of a package via homebrew, an `@` symbol must be placed in-between the package name and its version.
Added missing symbol to `toolsrc/CMakeLists.txt`

See homebrew console output for reference:
```
Kristofs-Mac-Pro:vcpkg kristofdaja$ brew search gcc
==> Formulae
gcc                     gcc@5                   gcc@7                   x86_64-elf-gcc
gcc@4.9                 gcc@6                   gcc@8
```
2020-01-16 15:11:27 -08:00
xabbudm
e3dfd4a9fa [VCPKG] WinHTTPOption for company Proxy not correctly taken into account (#9372)
* fixes to get vcpkg up and running when behind corporate proxy

* clean up of code to check if HTTP_PROXY environment variable is set

*  fixed compiler errors for non win32 systems

* [vcpkg] Simplify HTTPS_PROXY code for WinHTTP

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-01-16 13:56:28 -08:00
Darrell
28eee51adb Minor edit to help message for cli depend-info option. Fix for #9534. (#9536) 2020-01-13 16:57:03 -08:00
martin-s
299c7c730c Introduce new policy to skip post verification of dll exports (#9642)
* - Introduce new policy to skip post verification of dll exports (see issue #9641).

* - Fixed line endings.
2020-01-13 16:31:58 -08:00