Skip to content
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 a mechanism for forcing codegen for an import/module. #16443

Closed
wants to merge 2 commits into from

Conversation

just-harry
Copy link
Contributor

@just-harry just-harry commented May 5, 2024

This PR adds a mechanism which lets the frontend indicate that codegen should always take place for an import/module, even if that module wasn't supplied on the command-line when the compiler was invoked, and regardless of whether the -i switch was supplied or not.

My main motivation for this is for #16372; so that codegen can be forced for the __builtins_msvc module, so that #include <importc_msvc_builtins.h> just works regardless of how the compiler was invoked. (Additional context: #16372 (comment); #16372 (comment); #16372 (comment))

@rikkimax
Copy link
Contributor

rikkimax commented May 5, 2024

This could very easily lead to duplicate symbols.

All the symbols would need to have the appropriate linker flag(s) set to allow for duplicates.

As-is this will result in our builds being more fragile than necessary. Some thinking about how to handle duplicates needs to take place before merging a solution to this.

@kinke and @ibuclaw will also need to sign off on this.

@just-harry
Copy link
Contributor Author

Closing this as I've realised a way to obviate the need for forcing module-wide codegen for #16372

@just-harry just-harry closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants