Skip to content

Commit 84222a9

Browse files
authored
Update apple-runtime.md (#6985)
1 parent dcacde0 commit 84222a9

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/source/apple-runtime.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,26 @@ ExecuTorch initializes its backends and kernels (operators) during app startup b
144144
Here's an example of a Xcode configuration file (`.xcconfig`):
145145

146146
```
147-
OTHER_LDFLAGS[sdk=iphonesimulator*] = $(inherited) \
148-
-force_load $(BUILT_PRODUCTS_DIR)/libexecutorch-ios-release.a \
149-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_coreml-ios-release.a \
150-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-ios-release.a \
151-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-ios-release.a
152-
153-
OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) \
154-
-force_load $(BUILT_PRODUCTS_DIR)/libexecutorch-ios-release.a \
155-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_coreml-ios-release.a \
156-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-ios-release.a \
157-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-ios-release.a
158-
159-
OTHER_LDFLAGS[sdk=macos*] = $(inherited) \
160-
-force_load $(BUILT_PRODUCTS_DIR)/libexecutorch-ios-release.a \
161-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_coreml-ios-release.a \
162-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-ios-release.a \
163-
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-ios-release.a
147+
ET_PLATFORM[sdk=iphonesimulator*] = simulator
148+
ET_PLATFORM[sdk=iphoneos*] = ios
149+
ET_PLATFORM[sdk=macos*] = macos
150+
151+
OTHER_LDFLAGS = $(inherited) \
152+
-force_load $(BUILT_PRODUCTS_DIR)/libexecutorch-$(ET_PLATFORM)-release.a \
153+
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_coreml-$(ET_PLATFORM)-release.a \
154+
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-$(ET_PLATFORM)-release.a \
155+
-force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-$(ET_PLATFORM)-release.a \
156+
-force_load $(BUILT_PRODUCTS_DIR)/libkernels_optimized-$(ET_PLATFORM)-release.a \
157+
-force_load $(BUILT_PRODUCTS_DIR)/libkernels_quantized-$(ET_PLATFORM)-release.a
164158
```
165159

166-
Replace `release` with `debug` in library file names for a Debug mode config respectively. You can assign such `.xcconfig` file to your target in Xcode: add it to your project, navigate to the project's Info tab, and select it in the build configuration for Debug and Release modes.
160+
For a Debug build configuration, replace `release` with `debug` in the library file names. Remember to link against the ExecuTorch runtime (`libexecutorch`) in Debug mode even if other components are built for Release to preserve logs if needed.
161+
162+
You can assign such a config file to your target in Xcode:
163+
164+
1. Add the `.xcconfig` file to your project.
165+
2. Navigate to the project’s Info tab.
166+
3. Select the configuration file in the build configurations for Release (or Debug) mode.
167167

168168
## Runtime API
169169

0 commit comments

Comments
 (0)