-
Notifications
You must be signed in to change notification settings - Fork 37.7k
ci: document that -Wreturn-type has been fixed upstream (mingw-w64) #28092
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
ci: document that -Wreturn-type has been fixed upstream (mingw-w64) #28092
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
e438a10
to
a046ac7
Compare
Remembered why we can't make this change; because the current code was added to our buildsystem as a hack to fix the Windows CI under |
Looks like this triggers an OOM for some reason, when it shouldn't? |
Looks like this is the same bug with overriding cxxflags dropping other flags. Will fix that. |
Ok, an alternative would be to embed the |
`noreturn` attributes have been added to the mingw-w64 headers, meaning that from 11.0.0 onwards, you'll no-longer see `-Wreturn-type` warnings when using assert(false): mingw-w64/mingw-w64@1690994. Add -Wno-return-type to the Windows CI, where is should have been all along, and document why it's required. This can be dropped when we are using the fixed version of the mingw-w64 headers there. Drop the -Werror -Wno-return-type special case from our build system. -Wreturn-type is on by default in Clang and GCC.
a046ac7
to
08eb5f1
Compare
Ok. Done with less embedding. Only difference between this and master is i.e master https://cirrus-ci.com/task/6747293471211520?logs=ci#L1367 vs this PR https://cirrus-ci.com/task/5094810491551744?logs=ci#L983. |
Given that the config will be bumped to gcc-12 anyway (#27897), how hard would it be to bump mingw in guix and CI, and at the same time drop this completely? |
I have done the bump in Guix: https://lists.gnu.org/archive/html/guix-patches/2023-07/msg00159.html, so we'll have that once the time-machine is bumped. |
Doesn't this break other builds? So I was wondering if the time machine could be bumped (for mingw), but the Linux tasks be kept as-is for now? |
(I mean, obviously my preference would be to use clang for Windows cross-builds, because mingw doesn't seem to be used by any large/relevant software project anymore, so using it at all is becoming increasingly fragile, but doing another bump shouldn't hurt too much for now) |
We don't currently have an easy way to use separate time-machines for differents HOSTS, and I'm not sure if that's something we'd want to do. The general time-machine bump is only blocked on one last issue, so that should be done shortly.
I wouldn't be opposed to that. Although note that in that case we'd still be using mingw-w64, for the Windows headers/runtime etc, swapping out a GCC toolchain for an LLVM/Clang toolchain, so we'd still have to deal with issues like these in either case. In this PR, I'd really just like to remove the single |
Makes sense to me. It Edit: removal would be premature if the flag was necessary for building. But as this arguably never should've been there in the first place, I suppose that's not relevant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 08eb5f1
I'm fine with the warnings being printed until the mingw toolchain is rolled out everywhere.
Guix build:
find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
daeec3e7ea34ddf28200d95d96e3295cadfc48fba9d95234880f7c95ec2b56c7 guix-build-08eb5f1b67e2/output/dist-archive/bitcoin-08eb5f1b67e2.tar.gz
3fda74de33a0e2dccbb74db3766a628135c0f0de7f4ad07afaed82050a2a0a1c guix-build-08eb5f1b67e2/output/x86_64-w64-mingw32/SHA256SUMS.part
ce48e7bb01ed7d2d580a5ac629b515c13974fbfa68496cd902f76f55fae1b6d1 guix-build-08eb5f1b67e2/output/x86_64-w64-mingw32/bitcoin-08eb5f1b67e2-win64-debug.zip
6a7df9551fd286d12676e35af0b082eac731de7e1a4121be321f5d1f20529cdc guix-build-08eb5f1b67e2/output/x86_64-w64-mingw32/bitcoin-08eb5f1b67e2-win64-setup-unsigned.exe
ac21d932789a1c9bfbd3072d61b8aa4bcdfa4ff97918a7d78320614257538787 guix-build-08eb5f1b67e2/output/x86_64-w64-mingw32/bitcoin-08eb5f1b67e2-win64-unsigned.tar.gz
e57e2ded1b225c6038346348e9b5b9480d75c391329697b5206ed73e586bada9 guix-build-08eb5f1b67e2/output/x86_64-w64-mingw32/bitcoin-08eb5f1b67e2-win64.zip
noreturn
attributes have been added to the mingw-w64 headers, mingw-w64/mingw-w64@1690994, meaning that from 11.0.0 onwards, you'll no-longer see-Wreturn-type
warnings when usingassert(false)
.Add -Wno-return-type to the Windows CI, where it should have been all
along, and document why it's required. This can be dropped when we are
using the fixed version of the mingw-w64 headers there.
Drop the -Werror -Wno-return-type special case from our build system.
-Wreturn-type is on by default in Clang and GCC.
The new mingw-w64 header behaviour can be checked on Ubuntu mantic, which ships with 11.0.0, using:
On Mantic (with 11.0.0):
x86_64-w64-mingw32-g++ test.cpp -Wreturn-type # nada
On Lunar (with 10.0.0):