-
-
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
build: fix clang-cl builds, add CI job #15449
Closed
Closed
Conversation
This file contains 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
Fixes: ``` In file included from C:\projects\curl\_bld\lib\CMakeFiles\libcurl_object.dir\Unity\unity_0_c.c:145: C:/projects/curl/lib/formdata.c(797,29): error : extension used [-Werror,-Wlanguage-extension-token] [C:\projects\curl\_bld\lib\libcurl_object.vcxproj] In file included from C:\projects\curl\_bld\lib\CMakeFiles\libcurl_object.dir\Unity\unity_0_c.c:391: C:/projects/curl/lib/warnless.c(117,33): error : extension used [-Werror,-Wlanguage-extension-token] [C:\projects\curl\_bld\lib\libcurl_object.vcxproj] C:/projects/curl/lib/warnless.c(60,28): message : expanded from macro 'CURL_MASK_SCOFFT' [C:\projects\curl\_bld\lib\libcurl_object.vcxproj] C:/projects/curl/lib/warnless.c(59,38): message : expanded from macro 'CURL_MASK_UCOFFT' [C:\projects\curl\_bld\lib\libcurl_object.vcxproj] C:\projects\curl\include\curl/system.h(352,40): message : expanded from macro 'CURL_TYPEOF_CURL_OFF_T' [C:\projects\curl\_bld\lib\libcurl_object.vcxproj] ``` https://ci.appveyor.com/project/curlorg/curl/builds/50887118/job/3kjlub2t0k6kadka#L180 Triggered by the `__int64` type, when using clang-cl (17.0.3). Follow-up to 84338c4 curl#12331
vszakats
force-pushed
the
appveyor-clang-cl
branch
from
October 29, 2024 15:57
17b9843
to
0baa299
Compare
This reverts commit d7820c2. It's on by default, so going with the solution of explicitly silencing it in source.
vszakats
force-pushed
the
appveyor-clang-cl
branch
from
October 29, 2024 16:15
c7e754a
to
4fb9259
Compare
vszakats
changed the title
appveyor: clang-cl blind try 1
build: fix clang-cl builds, add CI job
Oct 29, 2024
vszakats
force-pushed
the
appveyor-clang-cl
branch
from
October 29, 2024 17:55
46ad64f
to
8078cdd
Compare
vszakats
force-pushed
the
appveyor-clang-cl
branch
from
October 29, 2024 19:27
8078cdd
to
28b0370
Compare
``` curl\docs\examples\http2-upload.c(56,5): error : no previous prototype for function 'my_gettimeofday' [-Werror,-Wmissing-prototypes] [C:\projects\curl\_bld\docs\examples\curl-example-http2-upload.vcxproj] curl\docs\examples\http2-upload.c(56,1): message : declare 'static' if the function is not intended to be used outside of this translation unit [C:\projects\curl\_bld\docs\examples\curl-example-http2-upload.vcxproj] ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50888614/job/6gl5ssxusx7wmo2d#L476
__clang__ normally implies __GNUC__. Except for clang-cl, where it doesn't. Explicitly enable these for __clang__ to cover this case.
vszakats
force-pushed
the
appveyor-clang-cl
branch
from
October 29, 2024 22:03
0185e21
to
458dbea
Compare
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Nov 5, 2024
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
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Nov 5, 2024
This fixes clang-cl builds with `CURL_WERROR=OFF` (default). This warning is enabled by `-pedantic` as a warning and by `-pedantic-errors` as an error. Verifiable using llvm's `diagtool show-enabled -pedantic test.c`. Follow-up to fb711b5 curl#15449
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
appveyor: add build-only job for clang-cl.
cmake:
-pedantic-errors
enables-Werror,-Wlanguage-extension-token
automatically, which makes
__int64
detection fail.Explictly disable this compiler warning for clang-cl to make the
feature detection work and to accept
__int64
in the source code.cmake: disable
-Wlanguage-extension-token
warning for clang-clto fix these when encountering
__int64
:make
__GNUC__
warning suppressions apply to__clang__
too.Necessary for clang-cl, which defines the latter, but not the former.
(Regular clang defines both.)
examples: fix clang-cl compiler warning in
http2-upload.c
.unit2604: add missing
#pragma GCC diagnostic pop
.Follow-up to e53523f CI: move Azure jobs to GHA, fix fallouts, sshserver, runtests tweaks #14859
unit1652: limit compiler warning suppression to GCC.
They do not affect clang builds.
Follow-up to 71cf0d1 tests: speed up builds with single-binary test bundles #14772
PICKY_COMPILER=OFF
.https://ci.appveyor.com/project/curlorg/curl/builds/50887661/job/2q0w0sc72nf0379o
__int64
gets undetected and the build goes off-track.