DefineStd(Builder, "unix", Opts);
Builder.defineMacro("__ELF__");
Builder.defineMacro("__SCE__");
+ Builder.defineMacro("__STDC_NO_COMPLEX__");
+ Builder.defineMacro("__STDC_NO_THREADS__");
}
public:
// If we claim to not support the feature then we expect diagnostics when
// using that feature. Otherwise, we expect no diagnostics.
#ifdef __STDC_NO_COMPLEX__
- // We do not have any targets which do not support complex, so we don't
- // expect to get into this block.
- #error "it's unexpected that we don't support complex"
+ // PS4/PS5 set this to indicate no <complex.h> but still support the
+ // _Complex syntax.
+ #ifdef __SCE__
+ #define HAS_COMPLEX
+ #else
+ // We do not have any other targets which do not support complex, so we
+ // don't expect to get into this block.
+ #error "it's unexpected that we don't support complex"
+ #endif
float _Complex fc;
double _Complex dc;
long double _Complex ldc;