Skip to content

Move EXECUTORCH_ENABLE_PROGRAM_VERIFICATION to default preset #10800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025
Merged
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
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
# Instead please use `find_package(executorch REQUIRED)` in the example
# directory and add a new executable in the example `CMakeLists.txt`.

# _default_release_disabled_options: default value for options that should be
# disabled in Release mode by default. Users can still manually enable them,
# though.
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(_default_release_disabled_options OFF)
else()
set(_default_release_disabled_options ON)
endif()


if(NOT EXECUTORCH_ENABLE_LOGGING)
# Avoid pulling in the logging strings, which can be large. Note that this
# will set the compiler flag for all targets in this directory, and for all
Expand All @@ -110,10 +100,6 @@ endif()

add_definitions(-DET_MIN_LOG_LEVEL=${ET_MIN_LOG_LEVEL})

option(EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
${_default_release_disabled_options}
)
if(NOT EXECUTORCH_ENABLE_PROGRAM_VERIFICATION)
# Avoid pulling in the flatbuffer data verification logic, which can add about
# 20kB. Note that this will set the compiler flag for all targets in this
Expand Down
3 changes: 0 additions & 3 deletions tools/cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ function(executorch_print_configuration_summary)
message(STATUS " CMAKE_TOOLCHAIN_FILE : ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS " BUCK2 : ${BUCK2}")
message(STATUS " PYTHON_EXECUTABLE : ${PYTHON_EXECUTABLE}")
message(STATUS " EXECUTORCH_ENABLE_PROGRAM_VERIFICATION : "
"${EXECUTORCH_ENABLE_PROGRAM_VERIFICATION}"
)
message(STATUS " EXECUTORCH_BUILD_ANDROID_JNI : "
"${EXECUTORCH_BUILD_ANDROID_JNI}"
)
Expand Down
5 changes: 5 additions & 0 deletions tools/cmake/preset/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ define_overridable_option(
"Build with the given ET_MIN_LOG_LEVEL value"
STRING "Info"
)
define_overridable_option(
EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
BOOL ${_is_build_type_debug}
)

# MARK: - Validations
# At this point all the options should be configured with their final value.
Expand Down
Loading