fix: pass /utf-8 only if the compiler is MSVC at build time#4159
Merged
vitaut merged 1 commit intofmtlib:masterfrom Sep 11, 2024
Merged
fix: pass /utf-8 only if the compiler is MSVC at build time#4159vitaut merged 1 commit intofmtlib:masterfrom
vitaut merged 1 commit intofmtlib:masterfrom
Conversation
Contributor
|
Thanks for the fix! |
Contributor
Author
|
@vitaut you're welcome. Is there a way I can backport this to a previous version as a hotfix? It's blocking fmt's usage through vcpkg on Windows with LLVM. |
Merged
7 tasks
Contributor
Author
|
For now, I am adding a patch to vcpkg |
aminya
added a commit
to aminya/vcpkg
that referenced
this pull request
Sep 12, 2024
Contributor
|
We could make a new release but since you've already submitted a patch for vcpkg let's just go with it. |
facebook-github-bot
pushed a commit
to facebook/folly
that referenced
this pull request
Sep 30, 2024
Summary: Workaround for #2250. Ideally, the code should support the generator expression, but this workaround fixes the problem for fmt. Also, see fmtlib/fmt#4159 and microsoft/vcpkg#40944 Pull Request resolved: #2293 Reviewed By: Gownta Differential Revision: D62785183 Pulled By: Orvid fbshipit-source-id: d45768f12d28f53122fdedfc396f1d27c7259d19
facebook-github-bot
pushed a commit
to facebook/hhvm
that referenced
this pull request
Sep 30, 2024
Summary: Workaround for facebook/folly#2250. Ideally, the code should support the generator expression, but this workaround fixes the problem for fmt. Also, see fmtlib/fmt#4159 and microsoft/vcpkg#40944 X-link: facebook/folly#2293 Reviewed By: Gownta Differential Revision: D62785183 Pulled By: Orvid fbshipit-source-id: d45768f12d28f53122fdedfc396f1d27c7259d19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4158
Fmt has started adding
/utf-8flags when installed through vcpkg on Windows even though it's not supported by Clang.https://github.com/aminya/cpp_vcpkg_project/actions/runs/10810623863/job/29988266523?pr=55#step:6:213
Here's a full reproduction:
https://github.com/aminya/cpp_vcpkg_project/tree/a53c2ce04dd16a26a60a3c1d85d2df212977319a
Here are some generated code in
build/vcpkg_installed/x64-windows/share/fmt/fmt-targets.cmakeThis should be conditional. Although vcpkg might use its own toolchain, it doesn't mean the cmake file will be used with MSVC for all the users of fmt. This includes clang-tidy usage (different at build time than configuration time).