diff --git a/kernels/portable/cpu/pattern/targets.bzl b/kernels/portable/cpu/pattern/targets.bzl index 636c5d2127b..a0a0ecfff73 100644 --- a/kernels/portable/cpu/pattern/targets.bzl +++ b/kernels/portable/cpu/pattern/targets.bzl @@ -54,7 +54,10 @@ def define_common_targets(): exported_headers = [ "pattern.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), exported_deps = [ "//executorch/kernels/portable/cpu/util:broadcast_util", "//executorch/kernels/portable/cpu/util:functional_util", diff --git a/kernels/portable/cpu/util/targets.bzl b/kernels/portable/cpu/util/targets.bzl index 8194b37f319..9a33090aa74 100644 --- a/kernels/portable/cpu/util/targets.bzl +++ b/kernels/portable/cpu/util/targets.bzl @@ -45,7 +45,10 @@ def define_common_targets(): exported_headers = [ "activation_ops_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/core/exec_aten/util:tensor_shape_to_c_string", "//executorch/runtime/kernel:kernel_includes", @@ -95,7 +98,10 @@ def define_common_targets(): exported_headers = [ "dtype_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/kernel:kernel_includes", ], @@ -107,7 +113,10 @@ def define_common_targets(): exported_headers = [ "elementwise_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), exported_deps = [ ":broadcast_indexes_range", ":broadcast_util", @@ -131,7 +140,10 @@ def define_common_targets(): exported_headers = [ "advanced_index_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ ":broadcast_util", "//executorch/runtime/core/exec_aten/util:tensor_shape_to_c_string", @@ -146,8 +158,12 @@ def define_common_targets(): exported_headers = [ "copy_ops_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], - exported_deps = [ + + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), +exported_deps = [ ":broadcast_util", ], deps = [ @@ -162,7 +178,10 @@ def define_common_targets(): exported_headers = [ "distance_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/kernel:kernel_includes", ], @@ -175,7 +194,10 @@ def define_common_targets(): exported_headers = [ "kernel_ops_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/kernel:kernel_includes", ], @@ -188,7 +210,10 @@ def define_common_targets(): exported_headers = [ "matmul_ops_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ ":broadcast_util", "//executorch/runtime/kernel:kernel_includes", @@ -202,7 +227,10 @@ def define_common_targets(): exported_headers = [ "padding_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/kernel:kernel_includes", ], @@ -215,7 +243,10 @@ def define_common_targets(): exported_headers = [ "normalization_ops_util.h", ], - compiler_flags = ["-Wno-missing-prototypes"], + compiler_flags = select({ + "DEFAULT":["-Wno-missing-prototypes"], + "ovr_config//os:windows": [], + }), deps = [ "//executorch/runtime/kernel:kernel_includes", ], diff --git a/runtime/core/portable_type/c10/c10/targets.bzl b/runtime/core/portable_type/c10/c10/targets.bzl index c89212ce9d5..d717437f8b6 100644 --- a/runtime/core/portable_type/c10/c10/targets.bzl +++ b/runtime/core/portable_type/c10/c10/targets.bzl @@ -46,7 +46,7 @@ def get_sleef_deps(): "fbsource//third-party/sleef:sleef", ], }), - "ovr_config//os:windows": [], + "ovr_config//os:windows": ["fbsource//third-party/sleef:sleef"], }) def define_common_targets():