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

[flatbuffers] respect the VCPKG_BUILD_TYPE var #39284

Open
jonatino opened this issue Jun 14, 2024 · 5 comments
Open

[flatbuffers] respect the VCPKG_BUILD_TYPE var #39284

jonatino opened this issue Jun 14, 2024 · 5 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@jonatino
Copy link

jonatino commented Jun 14, 2024

Is your feature request related to a problem? Please describe.

Right now flatbuffers doesn't respect the VCPKG_BUILD_TYPE variable causing a x64-windows-dbg, x64-windows-rel, x64-windows-static-release-rel when my triplet is set to x64-windows-static-release which sets VCPKG_BUILD_TYPE to release. This causes slow build times needing to build 3 different version and since flatbuffers is a large repo, a significant amount of disk space is wasted.

Proposed solution

Update the flatbuffers vcpkg to properly respect the VCPKG_BUILD_TYPE environment variable to avoid useless builds and wasted disk space.

Describe alternatives you've considered

No response

Additional context

No response

@jonatino jonatino added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jun 14, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Jun 14, 2024

"A single build will consume files from up to two triplets: the target triplet and the host triplet."
https://learn.microsoft.com/vcpkg/concepts/triplets

I guess what you really want is to set the host triplet.

@jonatino
Copy link
Author

@dg0yt I tried setting those variables but it still results in 3 builds.

set VCPKG_HOST_TRIPLET=x64-windows-static-release
set VCPKG_TARGET_TRIPLET=x64-windows-static-release

image

@dg0yt
Copy link
Contributor

dg0yt commented Jun 14, 2024

The syntax seems to be cmd for environment variables. But the variable names are for CMake input variables. Try:

set VCPKG_DEFAULT_HOST_TRIPLET=x64-windows-static-release

https://learn.microsoft.com/de-de/vcpkg/users/config-environment#vcpkg_default_host_triplet

@jonatino
Copy link
Author

The syntax seems to be cmd for environment variables. But the variable names are for CMake input variables. Try:

set VCPKG_DEFAULT_HOST_TRIPLET=x64-windows-static-release

https://learn.microsoft.com/de-de/vcpkg/users/config-environment#vcpkg_default_host_triplet

That did it! Thank you.

I'm not sure whether to leave this issue open as this is the only dependency I have that's required to have VCPKG_DEFAULT_HOST_TRIPLET set to only build x64-windows-static-release-rel as all the others do that just by using the x64-windows-static-release` triplet.

@dg0yt
Copy link
Contributor

dg0yt commented Jun 14, 2024

I'm not sure whether to leave this issue open.

There is no port bug here. The port does respect VCPKG_BUILD_TYPE.

There might be an issue with communication/learning about triplets and variables, but it is more between the lines at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

3 participants