@@ -83,6 +83,7 @@ function print_help {
8383 echo " Build the filament dependent tools (matc, resgen) separately from the project. This will set"
8484 echo " the tools as prebuilts that filament target will then use to build. The built_type option"
8585 echo " (debug|release) is meant to indicate the type of build of the resulting prebuilts."
86+ echo " Defaults to 'release' (tools are always prebuilt as release unless overridden)."
8687 echo " "
8788 echo " Build types:"
8889 echo " release"
@@ -223,8 +224,8 @@ OSMESA_OPTION=""
223224IOS_BUILD_SIMULATOR=false
224225BUILD_UNIVERSAL_LIBRARIES=false
225226
226- ISSUE_SPLIT_BUILD=false
227- SPLIT_BUILD_TYPE=" "
227+ ISSUE_SPLIT_BUILD=true
228+ SPLIT_BUILD_TYPE=" release "
228229PREBUILT_TOOLS_DIR=" "
229230IMPORT_EXECUTABLES_DIR_OPTION=" -DIMPORT_EXECUTABLES_DIR=out"
230231
@@ -1132,13 +1133,6 @@ done
11321133
11331134validate_build_command
11341135
1135- if [[ " ${ISSUE_SPLIT_BUILD} " == " true" ]]; then
1136- # Capitalize first letter of SPLIT_BUILD_TYPE
1137- SPLIT_BUILD_TYPE_CAPITALIZED=" $( echo ${SPLIT_BUILD_TYPE: 0: 1} | tr ' [:lower:]' ' [:upper:]' ) ${SPLIT_BUILD_TYPE: 1} "
1138- build_tools_for_split_build " ${SPLIT_BUILD_TYPE_CAPITALIZED} "
1139- IMPORT_EXECUTABLES_DIR_OPTION=" -DFILAMENT_IMPORT_PREBUILT_EXECUTABLES_DIR=${PREBUILT_TOOLS_DIR} "
1140- fi
1141-
11421136if [[ " ${ISSUE_CLEAN} " == " true" ]]; then
11431137 build_clean
11441138fi
@@ -1147,6 +1141,16 @@ if [[ "${ISSUE_CLEAN_AGGRESSIVE}" == "true" ]]; then
11471141 build_clean_aggressive
11481142fi
11491143
1144+ # Only runs the split build for tools if an actual debug or release build is requested.
1145+ # This prevents the split build from being triggered when a clean (-c or -C) is requested.
1146+ if [[ " ${ISSUE_SPLIT_BUILD} " == " true" ]] && \
1147+ [[ " ${ISSUE_DEBUG_BUILD} " == " true" || " ${ISSUE_RELEASE_BUILD} " == " true" ]]; then
1148+ # Capitalize first letter of SPLIT_BUILD_TYPE
1149+ SPLIT_BUILD_TYPE_CAPITALIZED=" $( echo ${SPLIT_BUILD_TYPE: 0: 1} | tr ' [:lower:]' ' [:upper:]' ) ${SPLIT_BUILD_TYPE: 1} "
1150+ build_tools_for_split_build " ${SPLIT_BUILD_TYPE_CAPITALIZED} "
1151+ IMPORT_EXECUTABLES_DIR_OPTION=" -DFILAMENT_IMPORT_PREBUILT_EXECUTABLES_DIR=${PREBUILT_TOOLS_DIR} "
1152+ fi
1153+
11501154if [[ " ${ISSUE_DESKTOP_BUILD} " == " true" ]]; then
11511155 check_debug_release_build build_desktop
11521156fi
0 commit comments