-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Don't emit module metadata for non-toplevel modules. #58508
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
base: master
Are you sure you want to change the base?
Conversation
Instead, rely on the linker automatically inheriting the metadata from the parent module. This avoids warnings and aborts with external users such as GPUCompiler.jl.
c8760c3
to
a7df949
Compare
Looks fine to me. I guess our adhoc linker was fine with this but LLVMs default one complained? |
Yeah, IIUC another thing that landed as part of #57010. |
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.
The concept that there is a "parent module" seems unsound to me. Does your linker not handle these correctly? I'd expect the LTO linker we're using here to combine these properly.
I'm not linking these, that happens as part of
... or an abort when there's a mismatch in stack-protector flags. I considered alternative approaches, either (1) having the fresh modules in the |
I think this option makes the most sense. In theory LLVM already implements it because it uses this same operation in many places. In practice, it isn't exactly optimal, but it is just |
Instead, rely on the linker automatically inheriting the metadata from the parent module. This avoids warnings and aborts with external users such as GPUCompiler.jl.