diff --git a/runtime/core/named_data_map.h b/runtime/core/named_data_map.h index 31a60abb89f..68639ed872a 100644 --- a/runtime/core/named_data_map.h +++ b/runtime/core/named_data_map.h @@ -7,6 +7,9 @@ */ #pragma once +// Disable -Wdeprecated-declarations, as some builds use 'Werror'. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include @@ -75,3 +78,5 @@ class ET_EXPERIMENTAL NamedDataMap { } // namespace runtime } // namespace executorch + +#pragma GCC diagnostic pop diff --git a/runtime/executor/method.h b/runtime/executor/method.h index 8b3330fb5a0..ac6bdd8728b 100644 --- a/runtime/executor/method.h +++ b/runtime/executor/method.h @@ -7,6 +7,9 @@ */ #pragma once +// Disable -Wdeprecated-declarations, as some builds use 'Werror'. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include @@ -358,3 +361,5 @@ namespace executor { using ::executorch::runtime::Method; } // namespace executor } // namespace torch + +#pragma GCC diagnostic pop diff --git a/runtime/executor/program.h b/runtime/executor/program.h index f7469eb2192..aac3d1cdfe9 100644 --- a/runtime/executor/program.h +++ b/runtime/executor/program.h @@ -7,6 +7,9 @@ */ #pragma once +// Disable -Wdeprecated-declarations, as some builds use 'Werror'. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include @@ -301,3 +304,5 @@ namespace executor { using ::executorch::runtime::Program; } // namespace executor } // namespace torch + +#pragma GCC diagnostic pop