libdispatch: Don't use vcenvvars - #43
Merged
Merged
Conversation
Compiler errors occur when compiling libdispatch using the Visual C++ system headers, such as about `memory_order_relaxed` not being defined. This appears to be because the Visual C++ system headers don't define this enum or don't define this enum in the same header. The build system will pick up the Visual C++ system headers if the `compiler.runtime` and `compiler.runtime_version` values are set (by virtue of the `VCVars` generator, which is used implicitly by the CMake generator, see https://github.com/conan-io/conan/blob/9826fbd57f43b847d22d4530dfe40f015f4dc9e5/conan/tools/microsoft/visual.py#L302). If `compiler.runtime` and `compiler.runtime_version` is not set, `VCVars` will not run, and the Visual C++ system headers are not picked up. Instead, the Clang headers will be used, which define `memory_order_relaxed` the way libdispatch expects it.
qmfrederik
force-pushed
the
fixes/dispatch-use-clang
branch
from
August 12, 2025 15:24
1f045d0 to
0580e86
Compare
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.
Compiler errors occur when compiling libdispatch using the Visual C++ system headers, such as about
memory_order_relaxednot being defined. This appears to be because the Visual C++ system headers don't define this enum or don't define this enum in the same header.The build system will pick up the Visual C++ system headers if the
compiler.runtimeandcompiler.runtime_versionvalues are set (by virtue of theVCVarsgenerator, which is used implicitly by the CMake generator, see https://github.com/conan-io/conan/blob/9826fbd57f43b847d22d4530dfe40f015f4dc9e5/conan/tools/microsoft/visual.py#L302).If
compiler.runtimeandcompiler.runtime_versionis not set,VCVarswill not run, and the Visual C++ system headers are not picked up. Instead, the Clang headers will be used, which definememory_order_relaxedthe way libdispatch expects it.