-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[rebranch][Runtime] Remove attribute ordering hack #62497
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
@swift-ci please test |
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.
Beautiful! Thank you!
Still failing on CI: I noticed that Saleem's patch was backported to stable/20221013, swiftlang/llvm-project#5655, while trunk still uses stable/20220421, which would partially explain why this is failing (there appear to be other errors too). |
Interesting 🤔. I didn't think we needed Saleem's patch in stable/20220421 but ... apparently attributes are also broken there? It has quite a few conflicts so I'm not sure about cherry-picking it. Any thoughts @compnerd? Maybe we need to use this hack for |
I think that leaving it on main for a little bit is fine. We can fix this on the rebranch. I can take a look at backporting the clang change to the current branch. Seems better to fix it before the next release. |
Remove the split macro definitions and move the SWIFT_RUNTIME_EXPORT macro to the beginning of the attributes list so that `extern "C"` becomes the first attribute. This is possible since stable/20221013 where mixing GNU and standard attributes was fixed (https://reviews.llvm.org/D137979). Also remove an unnecessary include, which would prevent the compiler itself being built on the released clang-15 (since the GNU/standard attribute mixing fix isn't in clang-15).
2e4df58
to
6b2a97b
Compare
@swift-ci please test |
@@ -30,7 +30,6 @@ | |||
#include "swift/ClangImporter/ClangModule.h" | |||
#include "swift/Demangling/ManglingMacros.h" | |||
#include "swift/IRGen/Linking.h" | |||
#include "swift/Runtime/HeapObject.h" |
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.
Was this meant to be rebranch only? Seems like this can go on main as well?
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.
I can put it on main
if you want, I was just going to leave it until the rebranch is merged.
Note: we're apparently still failing on
ie. mixed attributes with |
@swift-ci please test |
Re-running now that swiftlang/llvm-project#5869 is merged |
@swift-ci please test macOS platform |
@swift-ci please clean test |
@swift-ci please test Linux platform |
So that I don't keep forgetting the problem here:
The proper fix here will be to properly split the runtime headers - the function declarations should only be available to the runtime, which is required to be built with the just-built compiler. This would also help in not accidentally including compiler headers in the runtime. Once that's done we can use |
Remove the split macro definitions and move the SWIFT_RUNTIME_EXPORT
macro to the beginning of the attributes list so that
extern "C"
becomes the first attribute. This is possible since stable/20221013
where mixing GNU and standard attributes was fixed
(https://reviews.llvm.org/D137979).
Also remove an unnecessary include, which would prevent the compiler
itself being built on the released clang-15 (since the GNU/standard
attribute mixing fix isn't in clang-15).