diff --git a/CMakeLists.txt b/CMakeLists.txt index 34538d1e5ab..b21616dc244 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,20 +410,6 @@ endif() message(STATUS "executorch: Using sources file ${EXECUTORCH_SRCS_FILE}") include(${EXECUTORCH_SRCS_FILE}) -# -# Modify default options when cross-compiling. -# -# The intent is for the EXECUTORCH_BUILD_HOST_TARGETS option to affect the -# default ON/OFF values of host targets around the tree. This way, a user can -# disable EXECUTORCH_BUILD_HOST_TARGETS to disable all host targets, and then -# optionally re-enable some of those targets. Or they could leave -# EXECUTORCH_BUILD_HOST_TARGETS enabled and then optionally disable any given -# host target. -# -# We can then use various cross-compilation hints to set the default value of -# EXECUTORCH_BUILD_HOST_TARGETS, which can still be overridden if desired. -# - # Detect if an iOS toolchain is set. if(CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$") set(CMAKE_TOOLCHAIN_IOS ON) @@ -458,16 +444,6 @@ if(EXECUTORCH_USE_CPP_CODE_COVERAGE) endif() endif() -# EXECUTORCH_BUILD_HOST_TARGETS: Option to control the building of host-only -# tools like `flatc`, along with example executables like `executor_runner` and -# libraries that it uses, like `gflags`. Disabling this can be helpful when -# cross-compiling, but some required tools that would have been built need to be -# provided directly. -cmake_dependent_option( - EXECUTORCH_BUILD_HOST_TARGETS "Build host-only targets." ON - "NOT CMAKE_TOOLCHAIN_IOS" OFF -) - # # flatc: Flatbuffer commandline tool to generate .h files from .fbs files # @@ -665,10 +641,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/configurations) # # gflags: Commandline flag host library. # -cmake_dependent_option( - EXECUTORCH_BUILD_GFLAGS "Build the gflags library." ON - EXECUTORCH_BUILD_HOST_TARGETS OFF -) +option(EXECUTORCH_BUILD_GFLAGS "Build the gflags library." ON) if(EXECUTORCH_BUILD_GFLAGS) add_subdirectory(third-party/gflags) endif() @@ -692,10 +665,7 @@ install(FILES tools/cmake/executorch-config.cmake DESTINATION lib/cmake/ExecuTor # # executor_runner: Host tool that demonstrates program execution. # -cmake_dependent_option( - EXECUTORCH_BUILD_EXECUTOR_RUNNER "Build the executor_runner executable" ON - EXECUTORCH_BUILD_HOST_TARGETS OFF -) +option(EXECUTORCH_BUILD_EXECUTOR_RUNNER "Build the executor_runner executable" ON) # Add googletest if any test targets should be built if(BUILD_TESTING) diff --git a/backends/cadence/build_cadence_fusionG3.sh b/backends/cadence/build_cadence_fusionG3.sh index 081226bcd94..9e18448a76d 100644 --- a/backends/cadence/build_cadence_fusionG3.sh +++ b/backends/cadence/build_cadence_fusionG3.sh @@ -40,7 +40,6 @@ if $STEPWISE_BUILD; then -DCMAKE_TOOLCHAIN_FILE=/home/zonglinpeng/ws/zonglinpeng/executorch/backends/cadence/cadence.cmake \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_HOST_TARGETS=ON \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=ON \ -DEXECUTORCH_BUILD_PTHREADPOOL=OFF \ -DEXECUTORCH_BUILD_CADENCE=ON \ @@ -65,7 +64,6 @@ else -DCMAKE_TOOLCHAIN_FILE=./backends/cadence/cadence.cmake \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_HOST_TARGETS=ON \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=ON \ -DEXECUTORCH_BUILD_PTHREADPOOL=OFF \ -DEXECUTORCH_BUILD_CPUINFO=OFF \ diff --git a/backends/cadence/build_cadence_hifi4.sh b/backends/cadence/build_cadence_hifi4.sh index ac1e03ba78e..67f3b7ca7f1 100644 --- a/backends/cadence/build_cadence_hifi4.sh +++ b/backends/cadence/build_cadence_hifi4.sh @@ -39,7 +39,6 @@ if $STEPWISE_BUILD; then -DCMAKE_TOOLCHAIN_FILE=./backends/cadence/cadence.cmake \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_HOST_TARGETS=ON \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=ON \ -DEXECUTORCH_BUILD_PTHREADPOOL=OFF \ -DEXECUTORCH_BUILD_CADENCE=ON \ @@ -63,7 +62,6 @@ else -DCMAKE_TOOLCHAIN_FILE=./backends/cadence/cadence.cmake \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE=Release \ - -DEXECUTORCH_BUILD_HOST_TARGETS=ON \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=ON \ -DEXECUTORCH_BUILD_PTHREADPOOL=OFF \ -DEXECUTORCH_BUILD_CPUINFO=OFF \ diff --git a/docs/source/backends-cadence.md b/docs/source/backends-cadence.md index d9811e6b6c4..9f15656d39c 100644 --- a/docs/source/backends-cadence.md +++ b/docs/source/backends-cadence.md @@ -170,7 +170,6 @@ cmake -DCMAKE_TOOLCHAIN_FILE=/backends/cadence/cadence.cmake -DCMAKE_BUILD_TYPE=Debug \ -DPYTHON_EXECUTABLE=python3 \ -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \ - -DEXECUTORCH_BUILD_HOST_TARGETS=ON \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \ -DEXECUTORCH_BUILD_PTHREADPOOL=OFF \ -DEXECUTORCH_BUILD_CPUINFO=OFF \ diff --git a/tools/cmake/Utils.cmake b/tools/cmake/Utils.cmake index 8f3e37d9a9e..0a09f51fd28 100644 --- a/tools/cmake/Utils.cmake +++ b/tools/cmake/Utils.cmake @@ -93,9 +93,6 @@ function(executorch_print_configuration_summary) STATUS " EXECUTORCH_BUILD_GFLAGS : ${EXECUTORCH_BUILD_GFLAGS}" ) - message(STATUS " EXECUTORCH_BUILD_HOST_TARGETS : " - "${EXECUTORCH_BUILD_HOST_TARGETS}" - ) message(STATUS " EXECUTORCH_BUILD_KERNELS_CUSTOM : " "${EXECUTORCH_BUILD_KERNELS_CUSTOM}" )