Suppress -Wunguarded-availability in MetalBackend.h
Chromium will use this header and currently uses a minimum SDK version without Metal, so it gets a compilation warning on MTLDevice. There is no good way to guard availability in headers, so just suppress the warning in the whole header and push the warning to usage of types in client code. BUG=chromium:938895 Change-Id: Id8ec224825c39a28a404be216556780713ecaf15 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5440 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
9bf529ec94
commit
070052f6b7
|
@ -18,6 +18,13 @@
|
|||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
// The specifics of the Metal backend expose types in function signatures that might not be
|
||||
// available in dependent's minimum supported SDK version. Suppress all availability errors using
|
||||
// clang's pragmas. Dependents using the types without guarded availability will still get errors
|
||||
// when using the types.
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunguarded-availability"
|
||||
|
||||
struct __IOSurface;
|
||||
typedef __IOSurface* IOSurfaceRef;
|
||||
|
||||
|
@ -38,4 +45,6 @@ namespace dawn_native { namespace metal {
|
|||
}} // namespace dawn_native::metal
|
||||
#endif // __OBJC__
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#endif // DAWNNATIVE_METALBACKEND_H_
|
||||
|
|
Loading…
Reference in New Issue