Skip to content

Commit eacf0db

Browse files
committed
Update on "Build optimized operators lib with -fexceptions"
It should be permissible for this library to use exceptions, since it is not required to supported embedded systems. TODO: presumably we need to manage rollout of the torchgen patch? Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/) [ghstack-poisoned]
2 parents 238d6f0 + a346b8b commit eacf0db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2ea4b56ec872424e486c4fe2d55da061067a2ed3
1+
f0c50a619c282a01ef1ad33690b7ab5e615d9fef

configurations/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
4242

4343
generate_bindings_for_kernels(
4444
LIB_NAME "optimized_native_cpu_ops_lib" FUNCTIONS_YAML
45-
${CMAKE_CURRENT_BINARY_DIR}/merged.yaml
45+
${CMAKE_CURRENT_BINARY_DIR}/merged.yaml ADD_EXCEPTION_BOUNDARY
4646
)
47-
target_compile_options(optimized_native_cpu_ops_lib PRIVATE "-fexceptions")
4847
message("Generated files ${gen_command_sources}")
4948

5049
# optimized_native_cpu_ops_lib: Register optimized op kernels into the runtime
@@ -57,6 +56,7 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
5756
DEPS
5857
executorch
5958
)
59+
target_compile_options(optimized_native_cpu_ops_lib PRIVATE "-fexceptions")
6060

6161
install(TARGETS optimized_native_cpu_ops_lib DESTINATION lib)
6262
endif()

0 commit comments

Comments
 (0)