Skip to content

Commit 8b2f3bc

Browse files
committed
[Executorch][Kernels] Build optimized lib with -O2
Dont rely on top level config for optimization and rather set our own for optimized kernels Differential Revision: [D64910575](https://our.internmc.facebook.com/intern/diff/D64910575/) [ghstack-poisoned]
1 parent 16b633b commit 8b2f3bc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

kernels/optimized/lib_defs.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def define_libs():
121121
exported_headers = native.glob([
122122
"blas/**/*.h",
123123
]),
124+
compiler_flags = ["-O2"],
124125
header_namespace = "executorch/kernels/optimized",
125126
visibility = [
126127
"//executorch/...",

kernels/optimized/op_registration_util.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def define_op_library(name, deps):
8787
],
8888
# kernels often have helpers with no prototypes just disabling the warning here as the headers
8989
# are codegend and linked in later
90-
compiler_flags = ["-Wno-missing-prototypes"],
90+
compiler_flags = ["-Wno-missing-prototypes", "-O2"],
9191
deps = [
9292
"//executorch/runtime/kernel:kernel_includes",
9393
] + augmented_deps,

0 commit comments

Comments
 (0)