Skip to content

Commit 051b8c9

Browse files
chandanjain999facebook-github-bot
authored andcommitted
Use -O2 compilation for Autocorrect only (#15425)
Summary: Apply -02 compiler flag to make FLLM autocorrect faster Sheet measuring different scopes of applying -02 and the resulting latency https://docs.google.com/spreadsheets/d/1ZnxoRwCIiMz3hXyhgb6sm_2UThBUyq-mpp8RzksfJMQ/edit?usp=sharing ****Latency**** Reviewed By: BlakeLucchesi Differential Revision: D85152814
1 parent f4e1bd0 commit 051b8c9

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)