diff --git a/src/include/dawn_native/MetalBackend.h b/src/include/dawn_native/MetalBackend.h index ae8b58aa36..865362e79e 100644 --- a/src/include/dawn_native/MetalBackend.h +++ b/src/include/dawn_native/MetalBackend.h @@ -18,6 +18,13 @@ #include #include +// 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_