-
Notifications
You must be signed in to change notification settings - Fork 489
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
Add packages for bootstrapping Clang subsystem #2230
Conversation
(rebased on top of master so we get more disk space in CI) |
|
Had to fix patches a bit for dynamic linking to even succeed. Static vs dynamic size:
The saving is neat but unfortunately Clang crashes when building libc++. There must be something else missing in the patches but it's a needle in a haystack. Clang has extracted 13 MiB C++ source file that reproduces the crash so I can reliably reproduce the crash. However I have notices something weird, it doesn't crash when calling It might be not worth the trouble though so I kept static version for now. |
According to the stacktrace it seems to crash somewhere here: https://github.com/llvm/llvm-project/blob/176249bd6732a8044d457092ed932768724a6f06/llvm/lib/CodeGen/AsmPrinter/DIE.cpp#L214-L219 called from https://github.com/llvm/llvm-project/blob/176249bd6732a8044d457092ed932768724a6f06/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L1238 Getting debug build will be hard because of the MSYS overhead (this "minimal" release build already takes much longer than all LLVM related tools when building with MinGW). |
Actually disassembly looks suspiciously like https://github.com/llvm/llvm-project/blob/176249bd6732a8044d457092ed932768724a6f06/llvm/lib/CodeGen/AsmPrinter/DIE.cpp#L203-L212, except for some reason the initial NULL check of the |
Yeah, you are right. I looked at this code locally but posted wrong snippet. |
Yup, I guess the proper question would be how an |
WOW, this explains a lot:
|
c83ffd9
to
600200c
Compare
Finally fixed the build. @lazka how do we want to build it? |
Not sure if we can do bootstrapping in CI anyway.. so having that _variant thing seems fine (although defaulting to gcc). |
hm, on a second thought duplicating with different package names sounds like a good idea too.. if that works for you. |
789f351
to
ce78a14
Compare
I've split out changes for non Clang mingw-w64 packages, hopefully CI will succeed now. |
It appears that mingw-w64-cross-clang package failed to build in msys2-autobuild: https://github.com/msys2/msys2-autobuild/runs/1540405115?check_suite_focus=true#step:14:9264
I am more than a little suspicious that there was a missing (make)depends that resulted in the compiler just being broken, because it seemed like pretty much every test CMake did failed. |
Yeah the compiler is broken but it worked in this PR. Can I somehow download packages that were build by autobuild but are not yet in the repo? |
You can grab them manually from https://github.com/msys2/msys2-autobuild/releases/tag/staging-msys (and probably rename them), or use |
It looks like the packages that built are now in the repo |
Makedepends tweak in #2272 |
Thank you for looking into this, I was busy last week. |
Surely some of the patches are unnecessary for MSYS2 package but I included them from MINGW package so the are more "in-line".
Clang's msys target doesn't support using GCC's libstdc++ but it's not necessary for bootstrapping.
Headers and CRT use
_variant=gcc
so they have to built locally and uploaded (their pkgname differs if_variant=clang
is chosen).