Skip to content

Commit f460594

Browse files
Use -O2 compilation for Autocorrect only (#15425)
Differential Revision: D85152814 Pull Request resolved: #15583
1 parent 98afdeb commit f460594

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shim_et/xplat/executorch/build/runtime_wrapper.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ def _patch_build_mode_flags(kwargs):
117117
"ovr_config//os:macos": ["-fvisibility=default"],
118118
})
119119

120+
# Add -O2 compiler flag when the compiler_flag_O2 config is set
121+
kwargs["compiler_flags"] = kwargs["compiler_flags"] + select({
122+
"DEFAULT": [],
123+
# @oss-disable: "fbsource//xplat/assistant/oacr/native/scripts:compiler_flag_O2": ["-O2"],
124+
})
125+
120126
return kwargs
121127

122128
def _patch_test_compiler_flags(kwargs):

0 commit comments

Comments
 (0)