Skip to content

Commit 988435d

Browse files
authored
Make OS presets only build library (#12544)
### Summary I think mixing these different motivations (i.e. pybind vs. ET lib) can causes issues in the future with conflicting flags. For example, pybind always enables `EXECUTORCH_ENABLE_LOGGING` regardless of build mode (#12469). So, I think we should just make the platform presets build ET targeting that platform. ### Test plan CI
1 parent 1333b36 commit 988435d

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

CMakePresets.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
{
1010
"name": "macos",
11-
"displayName": "Build everything buildable on macOS",
11+
"displayName": "Build ExecuTorch for macOS",
1212
"inherits": ["common"],
1313
"generator": "Xcode",
1414
"cacheVariables": {
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"name": "ios",
28-
"displayName": "Build everything buildable on iOS",
28+
"displayName": "Build ExecuTorch for iOS",
2929
"inherits": ["common"],
3030
"generator": "Xcode",
3131
"cacheVariables": {
@@ -42,7 +42,7 @@
4242
},
4343
{
4444
"name": "ios-simulator",
45-
"displayName": "Build everything buildable on iOS simulator",
45+
"displayName": "Build ExecuTorch for iOS Simulator",
4646
"inherits": ["common"],
4747
"generator": "Xcode",
4848
"cacheVariables": {
@@ -59,7 +59,7 @@
5959
},
6060
{
6161
"name": "linux",
62-
"displayName": "Build everything buildable on Linux",
62+
"displayName": "Build ExecuTorch for Linux",
6363
"inherits": ["common"],
6464
"cacheVariables": {
6565
"CMAKE_SYSTEM_NAME": "Linux",
@@ -88,29 +88,21 @@
8888
{
8989
"name": "llm",
9090
"displayName": "Build LLM libraries",
91-
"inherits": [
92-
"common"
93-
],
91+
"inherits": ["common"],
9492
"cacheVariables": {
9593
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/llm.cmake",
9694
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
9795
},
9896
"condition": {
9997
"type": "inList",
10098
"string": "${hostSystemName}",
101-
"list": [
102-
"Darwin",
103-
"Linux",
104-
"Windows"
105-
]
99+
"list": ["Darwin", "Linux", "Windows"]
106100
}
107101
},
108102
{
109103
"name": "zephyr",
110-
"displayName": "Build everything buildable on Zephyr RTOS",
111-
"inherits": [
112-
"common"
113-
],
104+
"displayName": "Build ExecuTorch for Zephyr RTOS",
105+
"inherits": ["common"],
114106
"cacheVariables": {
115107
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/zephyr.cmake",
116108
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake"

tools/cmake/preset/linux.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/pybind.cmake)
87
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/llm.cmake)
98

109
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
10+
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)

tools/cmake/preset/llm.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
# Enable logging even when in release mode. We are building for desktop, where
8-
# saving a few kB is less important than showing useful error information to
9-
# users.
107
# keep sorted
118
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
129
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)

tools/cmake/preset/macos.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# LICENSE file in the root directory of this source tree.
66

77
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/apple_common.cmake)
8-
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/pybind.cmake)
9-
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/llm.cmake)
108

119
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)
1210
set_overridable_option(EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER ON)

0 commit comments

Comments
 (0)