-
Notifications
You must be signed in to change notification settings - Fork 340
[AVR] make the AVR ABI Swift compatible #8945
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
Conversation
This will also need a cherry-pick. |
neat! I have no idea what this does |
Hi @rauhul ... good question, I have to say the slightly unsatisfying answer is I curated a load of bug fixes over the years without keeping close enough notes as to the exact details of the bugs they were fixing. In nearly every case, the fix was to address the compiler "crashing" (i.e. trapping on an assert). I'm pretty certain the "crash" in question that this patch is intended to fix is from this helper function in clang...
...what I can't tell you (without doing a custom build to track it down) is where exactly this crash occurs in normal use. My vague memory/guess is if you run the swift compiler and it accesses the clang importer then that frequently causes this "crash" and as a result, all architectures that swift supports must have this sort of patch added to clang. It did come up on the call a week ago, discussed by @kubamracek and I because he had to add it to clang in order to get RISCV working. I flagged that I had tried without luck to get this patch merged to llvm/clang back in December/January and gave up. Kuba seemed to be saying that he too thinks this patch is essential for Swift to properly support AVR, but he can probably fill in the details a lot better than I can. For me, from the next point on, it's most useful to try building the standard library for AVR and seeing what breaks next. |
I think this change can go in, it's clearly needed for any compilations to work on AVR. We did the exact same change for RISC-V here: #8229 But we'll need a cherry-pick to |
@kubamracek sure thing... do I just create a separate PR targeted to that release? I'm sorry I'm not very familiar with the apple procedures for llvm patches. |
Yes, a separate PR. |
#8970 is this ok? |
No description provided.