Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kernels/portable/cpu/pattern/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
53 changes: 42 additions & 11 deletions kernels/portable/cpu/util/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def define_common_targets():
exported_headers = [
"activation_ops_util.h",
],
compiler_flags = ["-Wno-missing-prototypes"],
compiler_flags = select({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can selects be variables

COMMON_UTIL_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",
Expand Down Expand Up @@ -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",
],
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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 = [
Expand All @@ -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",
],
Expand All @@ -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",
],
Expand All @@ -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",
Expand All @@ -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",
],
Expand All @@ -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",
],
Expand Down
2 changes: 1 addition & 1 deletion runtime/core/portable_type/c10/c10/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the way this function is structured seems very strange to me.

})

def define_common_targets():
Expand Down
Loading