This is an archive of the discontinued LLVM Phabricator instance.

Add header guards for header files that should not be included on the PS4 platform
AbandonedPublic

Authored by dyung on Nov 15 2019, 3:42 PM.

Details

Reviewers
craig.topper
Summary

For the PS4 platform, we want to exclude certain headers from being included because we do not support the features they provide. So for the headers we want to exclude, this change adds a check whether ORBIS is defined and excludes the header from being included when it is. Compilers targeting the PS4 define ORBIS.

Diff Detail

Event Timeline

dyung created this revision.Nov 15 2019, 3:42 PM

You could probably just define add ORBIS to every line and then rely on the individual feature defines at the end of the line to re-enable the ones that are really supported. I assume the target-cpu is set to btver for ps4?

clang/lib/Headers/immintrin.h
460

you don't need this one either

dyung added a comment.Nov 15 2019, 6:10 PM

You could probably just define add ORBIS to every line and then rely on the individual feature defines at the end of the line to re-enable the ones that are really supported. I assume the target-cpu is set to btver for ps4?

Good point. I talked it over internally with a few other people and think this is a good way to go. I'll revise and upload a new patch later.

dyung abandoned this revision.Nov 21 2019, 2:02 AM