-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
cmake: clang-cl improvements #15478
cmake: clang-cl improvements #15478
Conversation
An interesting benefit of clang-cl is that it allows testing MSVC builds This needs obtaining MSVC runtime and headers. Here's a script that (I haven't tried that yet.) Another potential benefit is with projects with incomplete or broken BoringSSL builds have been broken with mingw-w64 for a while due Another long-term issue is that it relies on a MSVC-compiler-specifc AWS-LC could not be built with mingw-w64, and there was/is apparently |
Useful for clang-cl builds where this information doesn't appear elsewhere in the cmake configure log.
The msvc-wine repo did work nicely on the first try. It doesn't need Managed to do an actual MSVC-like cross-build for the first time. In theory this also allows creating MSVC builds via The necessary download is 2GB. 5.5GB unpacked, for 4 archs. Not necessarily for CI, but for local cross-tests this is neat:
(the curl CMake configuration is very experimental yet.) |
It's enabled by -pedantic as a warning and by -pedantic-errors as an error. Before this patch this was done only for `CURL_WERROR=ON` builds. (Verifiable using llvm's `diagtool show-enabled -pedantic test.c`) Follow-up to fb711b5 curl#15449
drop
/clang:
prefix for-W
options for clang-cl.Except for
-Wall
which gets interpreted as MSVC/Wall
and translated to
-Weverything
, which is undesired.Related: Clang-cl should map
/Wall
to-Wall
, not-Weverything
llvm/llvm-project#102982include
MSVC_VERSION
in target flags.Useful for clang-cl builds where this information doesn't appear
elsewhere in the cmake configure log.
suppress
-Wlanguage-extension-token
more for clang-cl.This fixes clang-cl builds with default
CURL_WERROR=OFF
andPICKY_COMPILER=ON
.This warning is enabled by
-pedantic
as a warning and by-pedantic-errors
as an error. Verifiable using llvm'sdiagtool show-enabled -pedantic test.c
.Follow-up to fb711b5 build: fix clang-cl builds, add CI job #15449
-Wno-language-extension-token
with clang-cl. (It's unclear which option enables it)w/o whitespace: https://github.com/curl/curl/pull/15478/files?w=1