@@ -193,52 +193,47 @@ set(ENV{PATH} "${WEBRTC_SRC_DIR}/depot_tools${PATH_SEP}$ENV{PATH}")
193193
194194file (MAKE_DIRECTORY ${WEBRTC_DIR} )
195195
196- message (STATUS "WebRTC: fetch" )
196+ message (STATUS "WebRTC: Configuring gclient for branch ${WEBRTC_BRANCH} " )
197+
197198execute_command (
198- COMMAND fetch --nohooks --no-history webrtc
199+ COMMAND gclient config --name src --unmanaged "https:// webrtc.googlesource.com/src.git@ ${WEBRTC_BRANCH} "
199200 WORKING_DIRECTORY "${WEBRTC_DIR} "
200201)
201202
202- message (STATUS "WebRTC: checkout \" ${WEBRTC_BRANCH} \" " )
203- execute_command (
204- COMMAND git checkout .
205- WORKING_DIRECTORY "${WEBRTC_SRC} "
206- )
203+ if (APPLE )
204+ set (WEBRTC_TARGET_OS "['mac']" )
205+ elseif (WIN32 )
206+ set (WEBRTC_TARGET_OS "['win']" )
207+ else ()
208+ set (WEBRTC_TARGET_OS "['linux']" )
209+ endif ()
207210
208- message (STATUS "WebRTC: fetching specific branch ${WEBRTC_BRANCH} " )
209- execute_command (
210- COMMAND git fetch origin ${WEBRTC_BRANCH} :${WEBRTC_BRANCH}
211- WORKING_DIRECTORY "${WEBRTC_SRC} "
212- )
211+ file (APPEND "${WEBRTC_DIR} /.gclient" "target_os = ${WEBRTC_TARGET_OS} \n " )
213212
214- message (STATUS "WebRTC: checkout to ${WEBRTC_BRANCH} " )
213+ message (STATUS "WebRTC: Syncing Sources (No Hooks, Shallow) " )
215214execute_command (
216- COMMAND git checkout ${WEBRTC_BRANCH}
217- WORKING_DIRECTORY "${WEBRTC_SRC } "
215+ COMMAND gclient sync -D --no-history --nohooks -j16
216+ WORKING_DIRECTORY "${WEBRTC_DIR } "
218217)
219218
220- message (STATUS "WebRTC: Patching DEPS to skip download of test resources " )
219+ message (STATUS "WebRTC: Patching DEPS" )
221220set (DEPS_FILE "${WEBRTC_SRC} /DEPS" )
222-
223221if (EXISTS "${DEPS_FILE} " )
224222 file (READ "${DEPS_FILE} " DEPS_CONTENT )
225-
226223 string (REPLACE
227224 "'src/resources'],"
228225 "'src/resources'], 'condition': 'False',"
229226 DEPS_CONTENT
230227 "${DEPS_CONTENT} "
231228 )
232-
233229 file (WRITE "${DEPS_FILE} " "${DEPS_CONTENT} " )
234230else ()
235231 message (WARNING "WebRTC: DEPS file not found. Optimization skipped." )
236232endif ()
237233
238-
239- message (STATUS "WebRTC: sync" )
234+ message (STATUS "WebRTC: Final Sync (Artifacts)" )
240235execute_command (
241- COMMAND gclient sync -D --no-history -j8
236+ COMMAND gclient sync -D --no-history -j16
242237 WORKING_DIRECTORY "${WEBRTC_DIR} "
243238)
244239
@@ -299,7 +294,6 @@ rtc_enable_protobuf=false \
299294rtc_include_tests=false \
300295rtc_include_dav1d_in_internal_decoder_factory=false \
301296rtc_enable_google_benchmarks=false \
302- rtc_video_psnr=false \
303297use_rtti=true \
304298symbol_level=0 \
305299use_dbus=false \
0 commit comments