[many ports] Apply host dependencies#16479
Conversation
f892cab to
d334797
Compare
strega-nil
left a comment
There was a problem hiding this comment.
just some minor notes, not fully reviewed
docs/users/host-dependencies.md
Outdated
There was a problem hiding this comment.
| string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" I_AM_NOT_CROSSCOMPILING) | |
no reason to have this, imo
There was a problem hiding this comment.
Not useful for users, but imho useful for maintainers. If you are writing a port that depends on itself with the host flag, you have to make distinctions if you are cross compiling or not. But an example like
if(NOT "${TARGET_TRIPLET}" STREQUAL "${HOST_TRIPLET}")
# specific cross compile code
endif()would be more helpful than the string example.
There was a problem hiding this comment.
nvm this is the next line.
There was a problem hiding this comment.
Is it a bug? But for me there is no variable ${HOST_TRIPLET} or the value is the empty string?
There was a problem hiding this comment.
Is it a bug? But for me there is no variable ${HOST_TRIPLET} or the value is the empty string?
nwm. set(HOST_TRIPLET "${_HOST_TRIPLET}") gets introduced with this PR. I thought it is already there...
There was a problem hiding this comment.
better define VCPKG_(IS_)CROSSCOMPILING
|
Is there a reason that this is a draft? |
|
I wanted to ensure it builds cleanly before requesting review, since build breaks will likely mean changing the approach in one or more ports |
|
all ports using |
|
With this PR I'm specifically targeting this list: vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 Lines 139 to 145 in a44feca |
d334797 to
00f3678
Compare
autoantwort
left a comment
There was a problem hiding this comment.
For the port boost-context and grpc the port version field was not updated
9d51fb4 to
51bafe6
Compare
|
another todo: all |
|
Hmm could it be that |
Yes it gets introduced with this PR. See |
|
hmm probably would make sense to split this PR up in two. a) could probably be merged way faster than b) |
|
The problem is really the changes to core helpers that provoke full rebuilds if any other core changes were merged; the handful of changed ports are insignificant here |
51bafe6 to
f3d8c3d
Compare
This contains all the docs and scripts changes from microsoft#16479, without any of the ports changes, for easier CR
This contains all the docs and scripts changes from #16479, without any of the ports changes, for easier CR
|
This PR assumes there will be only one host triplet needed, what if multiple tools need be installed with multiple host triplet? For example, what if user wants to build {
"name": "contoso-http-library",
"version-string": "1.0.0",
"description": "Contoso's http runtime library",
"dependencies": [
"contoso-core-library",
{
"name": "contoso-code-generator",
"host": true,
"host-triplet": "x86-windows"
},
{
"name": "contoso-build-system",
"host": true,
"host-triplet": "x64-windows"
}
]
}Basically |
|
@soumyamahunt that was already discussed in #15424 |
|
We also need to modify |
f3d8c3d to
5958b1c
Compare
…roschuma/tool-ports-2
While using that is suspect, it would certainly be a breaking change to do that now. We may wish to add a warning in the future. |
Reopening of #15424.
This PR solves a long-standing issue with manifests being unable to correctly install boost while cross-compiling. This is done by enabling consumers to mark a dependency as coming from the host (via
"host": true). The dependency can then be accessed in the portfile via${CURRENT_HOST_INSTALLED_DIR}/subpath.This PR does not automatically add any subpaths of the host installed dir to helpers such as
vcpkg_configure_cmake(). For now, consumers are intended to usevcpkg_add_to_path()to pick individual required executable folders:vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")See docs/users/tools.md for more details.