-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Don't use <intrin0.h>
with Clang
#3285
Conversation
Looks good, I've pushed a tiny change to remove fine-grained header inclusion since we're using the coarse-grained header in There is one remaining occurrence of us including something smaller than Lines 25 to 29 in 4483e87
This currently excludes Clang and is special, so leaving it as-is is totally fine. |
This would be fine: Clang overrides many (all?) of the Intel intrinsic headers. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for noticing the repeated problems here and finding a robust way to avoid them forever! 🛠️ 🐈 🎉 |
This quite dramatically increased inclusion cost for a lot of headers:
|
Addresses the problem mentioned in #2520 (comment). We've had several issues with Clang and
intrin0.h
in the past, hopefully we can fix them "forever" by avoidingintrin0.h
when compiling with Clang.The existence of
intrin0.h
is purely an optimization in that it allows us to avoid including the entirety ofintrin.h
. We could support this optimization with Clang in the future by adding anintrin0.h
to Clang's set of override headers. If we were to do so we should synchronize with libc++ on the proper set of intrinsics to move intointrin0.h
.