-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove SELECTANY usage #39532
Remove SELECTANY usage #39532
Conversation
Does I believe that it would have to be |
Also, we should get rid of other duplicate static const data from the header files. Here are the constant data symbols that I see defined in the .rodata more than once:
|
@jkotas I was considering that, but inline constexpr is c++17 only. We currently use c++11 features and I am not sure if we want to move to c++17 just for this. |
Agree. Should we do this the old-fashioned way and move the definitions to .c/.cpp files? |
There are only a few symbols duplicated, all of them taking 16 bytes (896 bytes total). So there doesn't seem to be much to be gained by redoing the change in the traditional way. Moreover, while some of the cases can be handled trivially, the EXTERN_GUID case would be kind of ugly, as we would have to duplicate all the GUIDS at two places (one in the header, one in a cpp file). Lot of the guids are in prebuilt headers on Unix pregenerated from ild files. 2x IID_ICeeGen 20x g_tkCorEncodeToken So I'd prefer keeping the change as is. |
I was referring to the symbols that my change touched. |
Ok, that does not sound too bad. Could you please resolve the conflict? |
This change replaces SELECTANY by using constexpr. It results in major reduction of the native binaries size (3.2MB in the libcoreclr.so case)
6b20530
to
71f6051
Compare
Rebased |
Failure is #39484 |
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.
Thanks!
This change regressed coreclr.dll size on Windows by ~200kB. I have opened a new bug on this: #39599 |
This change replaces SELECTANY by using constexpr. It results in major reduction of the native binaries size (3.2MB in the libcoreclr.so case)
This change replaces SELECTANY by using constexpr. It results in major
reduction of the native binaries size (3.2MB in the libcoreclr.so case)
Close #39281