Skip to content

Commit 4a69380

Browse files
committed
don't use invalid flags on windows
1 parent b2bee8c commit 4a69380

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

backends/vulkan/targets.bzl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "CXX", "FBCODE"
55

66

77
def get_vulkan_compiler_flags():
8-
return ["-Wno-missing-prototypes", "-Wno-global-constructors"]
8+
return select({
9+
"DEFAULT": [
10+
"-Wno-global-constructors",
11+
"-Wno-missing-prototypes",
12+
],
13+
"ovr_config//os:windows": [],
14+
})
915

1016
def get_labels(no_volk):
1117
if no_volk:

runtime/core/named_data_map.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
*/
88

99
#pragma once
10+
11+
#ifdef __GNUC__
1012
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
1113
#pragma GCC diagnostic push
1214
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
15+
#endif
1316

1417
#include <executorch/runtime/core/exec_aten/exec_aten.h>
1518
#include <executorch/runtime/core/freeable_buffer.h>
@@ -78,4 +81,6 @@ class ET_EXPERIMENTAL NamedDataMap {
7881
} // namespace runtime
7982
} // namespace executorch
8083

84+
#ifdef __GNUC__
8185
#pragma GCC diagnostic pop
86+
#endif

runtime/executor/method.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
*/
88

99
#pragma once
10+
11+
#ifdef __GNUC__
1012
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
1113
#pragma GCC diagnostic push
1214
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
15+
#endif
1316

1417
#include <executorch/runtime/core/evalue.h>
1518
#include <executorch/runtime/core/event_tracer.h>
@@ -402,4 +405,6 @@ using ::executorch::runtime::Method;
402405
} // namespace executor
403406
} // namespace torch
404407

408+
#ifdef __GNUC__
405409
#pragma GCC diagnostic pop
410+
#endif

runtime/executor/program.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
*/
88

99
#pragma once
10+
11+
#ifdef __GNUC__
1012
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
1113
#pragma GCC diagnostic push
1214
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
15+
#endif
1316

1417
#include <cinttypes>
1518
#include <cstdint>
@@ -308,4 +311,6 @@ using ::executorch::runtime::Program;
308311
} // namespace executor
309312
} // namespace torch
310313

314+
#ifdef __GNUC__
311315
#pragma GCC diagnostic pop
316+
#endif

runtime/executor/tensor_parser.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
*/
88

99
#pragma once
10+
11+
#ifdef __GNUC__
1012
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
1113
#pragma GCC diagnostic push
1214
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
15+
#endif
1316

1417
#include <executorch/runtime/core/evalue.h>
1518
#include <executorch/runtime/core/exec_aten/exec_aten.h>
@@ -154,4 +157,7 @@ using ::executorch::runtime::deserialization::parseTensorList;
154157
} // namespace deserialization
155158
} // namespace executor
156159
} // namespace torch
160+
161+
#ifdef __GNUC__
157162
#pragma GCC diagnostic pop
163+
#endif

0 commit comments

Comments
 (0)