-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Explicitly instantiate conditional_t #38361
Explicitly instantiate conditional_t #38361
Conversation
Breaks cross-compile to OSX on Jenkins, but don't affect native OSX builds as Travis CI passed. https://ci.narc.ro/job/Cataclysm-Matrix/Graphics=Tiles,Platform=OSX/10370/consoleFull
|
Could be related: https://stackoverflow.com/questions/19821041/g-ld-symbols-not-found-for-architecture-x86-64 Edit: Using different standard lib did not help. It actually stopped to compile at all (see https://ci.narc.ro/job/Cataclysm-Matrix/10374/Graphics=Curses,Platform=OSX/console). |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/compiling-error/22951/3 |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/compiling-error/22951/4 |
Summary
SUMMARY: None
Purpose of change
Build time profiling (see https://gist.github.com/ralreegorganon/b8211f6a286b880108ddad810aba76e3#file-gistfile1-txt-L159) points to conditional.cpp compile times being extremely high. It looks like the templating of conditional_t is the culprit.
Describe the solution
Switching conditional_t to explicit instantiation to reduce compile times.
Testing
If it builds it should work.
Additional context
See https://en.cppreference.com/w/cpp/language/class_template for explanation of explicit instantiation.