Skip to content

[vcpkg] Track compiler information in ABI#11654

Merged
ras0219-msft merged 15 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/track-compiler
Jun 22, 2020
Merged

[vcpkg] Track compiler information in ABI#11654
ras0219-msft merged 15 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/track-compiler

Conversation

@ras0219
Copy link
Contributor

@ras0219 ras0219 commented May 29, 2020

This PR implements Tracking Compilers of the Binarycaching RFC (#11204).

The approach taken is to run a CMake configure in the environment that will be used to build packages and hash CMAKE_CXX_COMPILER and CMAKE_C_COMPILER.

This introduces an extra CMake configure step for every vcpkg invocation that requires ABI information -- as such, it is behind the feature flag compilertracking (set VCPKG_FEATURE_FLAGS=compilertracking) until binarycaching is enabled by default.

@Neumann-A
Copy link
Contributor

Just a Note: We need to run CMake for every port which is not using CMake to actually get the correct compiler flags for the port using a given cmake toolchain anyway in the future. As such running this before the portfile could be beneficial.

…compiler

# Conflicts:
#	toolsrc/include/vcpkg/vcpkgpaths.h
#	toolsrc/src/vcpkg.cpp
#	toolsrc/src/vcpkg/build.cpp
#	toolsrc/src/vcpkg/vcpkgpaths.cpp
@ras0219
Copy link
Contributor Author

ras0219 commented Jun 6, 2020

Currently waiting for #11785

@JackBoosY JackBoosY added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:internal labels Jun 11, 2020
…compiler

# Conflicts:
#	toolsrc/include/vcpkg/globalstate.h
#	toolsrc/src/vcpkg.cpp
#	toolsrc/src/vcpkg/build.cpp
#	toolsrc/src/vcpkg/globalstate.cpp
@ras0219 ras0219 requested a review from BillyONeal June 22, 2020 15:08
@ras0219-msft ras0219-msft merged commit aef8385 into microsoft:master Jun 22, 2020
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants