Skip to content

Commit 40683bc

Browse files
jathulucylq
authored andcommitted
Clean cache between Apple builds (#12563)
### Summary In this diff, we clear the CMakeCache.txt between builds since we reuse the same build output for all the builds. Keeping the cache means that configuration between each build won't be reflected (i.e. #12469). ### Test plan CI I also tested to ensure that `EXECUTORCH_ENABLE_LOGGING` is being properly set based on the build mode. ``` -- PLATFORM: OS64 -- CMAKE_BUILD_TYPE: Release -- EXECUTORCH_ENABLE_LOGGING: OFF -- ---------------------------------------------------- -- PLATFORM: OS64 -- CMAKE_BUILD_TYPE: Debug -- EXECUTORCH_ENABLE_LOGGING: ON -- ---------------------------------------------------- -- PLATFORM: SIMULATORARM64 -- CMAKE_BUILD_TYPE: Release -- EXECUTORCH_ENABLE_LOGGING: OFF -- ---------------------------------------------------- -- PLATFORM: SIMULATORARM64 -- CMAKE_BUILD_TYPE: Debug -- EXECUTORCH_ENABLE_LOGGING: ON -- ---------------------------------------------------- -- PLATFORM: MAC_ARM64 -- CMAKE_BUILD_TYPE: Release -- EXECUTORCH_ENABLE_LOGGING: OFF -- ---------------------------------------------------- -- PLATFORM: MAC_ARM64 -- CMAKE_BUILD_TYPE: Debug -- EXECUTORCH_ENABLE_LOGGING: ON -- ---------------------------------------------------- ```
1 parent 287a9af commit 40683bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/build_apple_frameworks.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,11 @@ for preset_index in "${!PRESETS[@]}"; do
153153
echo "Building preset ${preset} (${mode}) in ${preset_output_dir}..."
154154

155155
# Do NOT add options here. Update the respective presets instead.
156-
# Xcode multi-config presets leave CMAKE_BUILD_TYPE empty, so force EXECUTORCH_ENABLE_LOGGING per-mode.
157156
cmake -S "${SOURCE_ROOT_DIR}" \
158157
-B "${preset_output_dir}" \
158+
--fresh \
159159
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="${preset_output_dir}" \
160160
-DCMAKE_BUILD_TYPE="${mode}" \
161-
-UEXECUTORCH_ENABLE_LOGGING \
162-
-DEXECUTORCH_ENABLE_LOGGING=$([ "${mode}" = "Debug" ] && echo ON || echo OFF) \
163161
${CMAKE_OPTIONS_OVERRIDE[@]:-} \
164162
--preset "${preset}"
165163

0 commit comments

Comments
 (0)