Skip to content
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
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ if(NOT EXECUTORCH_ENABLE_PROGRAM_VERIFICATION)
add_definitions(-DET_ENABLE_PROGRAM_VERIFICATION=0)
endif()

option(EXECUTORCH_ENABLE_EVENT_TRACER "Build with ET_EVENT_TRACER_ENABLED=ON"
OFF
)
if(EXECUTORCH_ENABLE_EVENT_TRACER)
add_definitions(-DET_EVENT_TRACER_ENABLED)
endif()
Expand Down Expand Up @@ -788,11 +785,7 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
endif()

if(EXECUTORCH_ENABLE_EVENT_TRACER)
if(EXECUTORCH_BUILD_DEVTOOLS)
list(APPEND _executor_runner_libs etdump flatccrt)
else()
message(SEND_ERROR "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled.")
endif()
list(APPEND _executor_runner_libs etdump flatccrt)
endif()

if(EXECUTORCH_BUILD_COREML)
Expand Down
9 changes: 1 addition & 8 deletions backends/xnnpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
add_executable(xnn_executor_runner ${_xnn_executor_runner__srcs})

if(EXECUTORCH_ENABLE_EVENT_TRACER)
if(EXECUTORCH_BUILD_DEVTOOLS)
list(APPEND xnn_executor_runner_libs etdump)
else()
message(
SEND_ERROR
"Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled."
)
endif()
list(APPEND xnn_executor_runner_libs etdump)
endif()

target_link_libraries(xnn_executor_runner gflags ${xnn_executor_runner_libs})
Expand Down
13 changes: 13 additions & 0 deletions tools/cmake/preset/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ define_overridable_option(
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
BOOL ${_is_build_type_debug}
)
define_overridable_option(
EXECUTORCH_ENABLE_EVENT_TRACER
"Build with ET_EVENT_TRACER_ENABLED"
BOOL OFF
)

# MARK: - Validations
# At this point all the options should be configured with their final value.
Expand All @@ -57,6 +62,7 @@ if(NOT EXISTS ${EXECUTORCH_PAL_DEFAULT_FILE_PATH})
message(FATAL_ERROR "PAL default implementation (EXECUTORCH_PAL_DEFAULT=${EXECUTORCH_PAL_DEFAULT}) file not found: ${EXECUTORCH_PAL_DEFAULT_FILE_PATH}. Choices: posix, minimal")
endif()


string(TOLOWER "${EXECUTORCH_LOG_LEVEL}" _executorch_log_level_lower)
if(_executorch_log_level_lower STREQUAL "debug")
set(ET_MIN_LOG_LEVEL Debug)
Expand All @@ -69,3 +75,10 @@ elseif(_executorch_log_level_lower STREQUAL "fatal")
else()
message(FATAL_ERROR "Unknown EXECUTORCH_LOG_LEVEL '${EXECUTORCH_LOG_LEVEL}'. Choices: Debug, Info, Error, Fatal")
endif()


if(EXECUTORCH_ENABLE_EVENT_TRACER)
if(NOT EXECUTORCH_BUILD_DEVTOOLS)
message(FATAL_ERROR "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled.")
endif()
endif()
Loading