-
Notifications
You must be signed in to change notification settings - Fork 179
Optimize WebRTC build: Other Platforms #2947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -193,20 +193,21 @@ else() | |||||||||||||||||
| if (TOOLCHAIN_BUILD_EXTERNALPROJECTS) | ||||||||||||||||||
|
|
||||||||||||||||||
| set (WEBRTC_SOURCE_ROOT ${WEBRTC_FETCH_PATH}/src) | ||||||||||||||||||
| file(MAKE_DIRECTORY ${WEBRTC_FETCH_PATH}) | ||||||||||||||||||
|
|
||||||||||||||||||
| ExternalProject_Add(depot-tools | ||||||||||||||||||
| BUILD_IN_SOURCE TRUE | ||||||||||||||||||
| GIT_REPOSITORY https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||||||||||||||||||
| GIT_TAG 39b2e4ef | ||||||||||||||||||
| # Tested with 23ad8839bff8e65fff2f1aabd4bc48fef894c4ae but hopefully 'main' continues to work | ||||||||||||||||||
| GIT_TAG main | ||||||||||||||||||
| UPDATE_COMMAND "" | ||||||||||||||||||
| INSTALL_DIR "" | ||||||||||||||||||
| CONFIGURE_COMMAND "" | ||||||||||||||||||
| CONFIGURE_COMMAND export PATH=<SOURCE_DIR>:$ENV{PATH} && ensure_bootstrap | ||||||||||||||||||
| BUILD_COMMAND "" | ||||||||||||||||||
| INSTALL_COMMAND "" | ||||||||||||||||||
| ) | ||||||||||||||||||
| ExternalProject_Get_Property(depot-tools SOURCE_DIR) | ||||||||||||||||||
| set (DEPOTTOOLS_DIR ${SOURCE_DIR}) | ||||||||||||||||||
| set (DEPOTTOOLS_EXPORT export PATH=$ENV{PATH}:${DEPOTTOOLS_DIR} DEPOT_TOOLS_UPDATE=0) | ||||||||||||||||||
| set (DEPOTTOOLS_EXPORT export PATH=$ENV{PATH}:${DEPOTTOOLS_DIR}) | ||||||||||||||||||
|
|
||||||||||||||||||
| if (${CMAKE_SYSTEM_NAME} MATCHES "iOS") | ||||||||||||||||||
| set (WEBRTC_REPO_NAME webrtc_ios) | ||||||||||||||||||
|
|
@@ -228,28 +229,29 @@ else() | |||||||||||||||||
| # is executed. | ||||||||||||||||||
| if (NOT EXISTS ${WEBRTC_SOURCE_ROOT}) | ||||||||||||||||||
| message (WARNING "WebRTC is not present in ${WEBRTC_SOURCE_ROOT}. Downloading... This takes a loooong time") | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD1 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && fetch --nohooks ${WEBRTC_REPO_NAME} && gclient sync --with_branch_heads --with_tags) | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD2 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_SOURCE_ROOT} && git checkout branch-heads/6818) | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD3 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && gclient sync -D) | ||||||||||||||||||
| set (WEBRTC_PATCH_CMD1 cd ${WEBRTC_SOURCE_ROOT} && git apply ${CMAKE_CURRENT_LIST_DIR}/libteamtalk-r6818.patch) | ||||||||||||||||||
| file(MAKE_DIRECTORY ${WEBRTC_FETCH_PATH}) | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD1 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && fetch --nohooks ${WEBRTC_REPO_NAME}) | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD2 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_SOURCE_ROOT} && git checkout branch-heads/6818) | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD3 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && gclient sync -D ${TOOLCHAIN_BUILD_MAKEJOBS}) | ||||||||||||||||||
| set (WEBRTC_PATCH_CMD cd ${WEBRTC_SOURCE_ROOT} && git apply ${CMAKE_CURRENT_LIST_DIR}/libteamtalk-r6818.patch) | ||||||||||||||||||
| else() | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD1 true) | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD2 true) | ||||||||||||||||||
| set (WEBRTC_FETCH_CMD3 true) | ||||||||||||||||||
| set (WEBRTC_PATCH_CMD1 true) | ||||||||||||||||||
| message (WARNING "WebRTC is already downloaded to ${WEBRTC_SOURCE_ROOT}. Skipping new fetch and patching") | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD1 "") | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD2 "") | ||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD3 "") | ||||||||||||||||||
| set (WEBRTC_PATCH_CMD "") | ||||||||||||||||||
|
Comment on lines
+239
to
+242
|
||||||||||||||||||
| set (WEBRTC_DOWNLOAD_CMD1 "") | |
| set (WEBRTC_DOWNLOAD_CMD2 "") | |
| set (WEBRTC_DOWNLOAD_CMD3 "") | |
| set (WEBRTC_PATCH_CMD "") | |
| set (WEBRTC_DOWNLOAD_CMD1 "${CMAKE_COMMAND} -E echo \"No-op\"") | |
| set (WEBRTC_DOWNLOAD_CMD2 "${CMAKE_COMMAND} -E echo \"No-op\"") | |
| set (WEBRTC_DOWNLOAD_CMD3 "${CMAKE_COMMAND} -E echo \"No-op\"") | |
| set (WEBRTC_PATCH_CMD "${CMAKE_COMMAND} -E echo \"No-op\"") |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webrtc-intel-src target now depends on webrtc-arm64-src (line 304) instead of depot-tools. However, it has empty DOWNLOAD_COMMAND and PATCH_COMMAND. This assumes that webrtc-arm64-src will handle the download and patching. If webrtc-arm64-src fails or is not built, webrtc-intel-src will attempt to build from a potentially non-existent source directory. The dependency should ensure proper sequencing, but the assumption that the source will exist should be documented or validated.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| gtest_enable_absl_printers = false | ||
| is_clang = false | ||
| is_debug = false | ||
| libsrtp_build_boringssl = false | ||
| libsrtp_ssl_root = "/dev/null" | ||
| mac_deployment_target = "@CMAKE_OSX_DEPLOYMENT_TARGET@" | ||
| rtc_build_examples = false | ||
| rtc_build_libvpx = false | ||
| rtc_build_opus = false | ||
| rtc_build_ssl = false | ||
| rtc_builtin_ssl_root_certificates = false | ||
| rtc_disable_logging = true | ||
| rtc_enable_protobuf = false | ||
| rtc_enable_sctp = false | ||
| rtc_exclude_field_trial_default = true | ||
| rtc_include_opus = false | ||
| rtc_include_tests = false | ||
| rtc_libvpx_build_vp9 = false | ||
| rtc_ssl_root = "/dev/null" | ||
| target_cpu = "@WEBRTC_ARCH@" | ||
| treat_warnings_as_errors = false | ||
| use_aura = false | ||
| use_custom_libcxx = false | ||
| use_ozone = false | ||
| use_rtti = true | ||
| gtest_enable_absl_printers=false | ||
| is_clang=false | ||
| is_debug=false | ||
| libsrtp_build_boringssl=false | ||
| libsrtp_ssl_root="/dev/null" | ||
| mac_deployment_target="@CMAKE_OSX_DEPLOYMENT_TARGET@" | ||
| rtc_build_examples=false | ||
| rtc_build_libvpx=false | ||
| rtc_build_opus=false | ||
| rtc_build_ssl=false | ||
| rtc_builtin_ssl_root_certificates=false | ||
| rtc_disable_logging=true | ||
| rtc_enable_protobuf=false | ||
| rtc_enable_sctp=false | ||
| rtc_exclude_field_trial_default=true | ||
| rtc_include_opus=false | ||
| rtc_include_tests=false | ||
| rtc_libvpx_build_vp9=false | ||
| rtc_ssl_root="/dev/null" | ||
| target_cpu="@WEBRTC_ARCH@" | ||
| treat_warnings_as_errors=false | ||
| use_aura=false | ||
| use_custom_libcxx=false | ||
| use_ozone=false | ||
| use_rtti=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GIT_TAG changed from a specific commit hash (39b2e4ef) to 'main' branch. Using 'main' instead of a pinned commit introduces non-deterministic builds, as the depot_tools version will change over time. This could lead to build reproducibility issues and potential breakage if depot_tools introduces breaking changes. Consider pinning to a specific commit hash for reproducible builds.