Skip to content

Commit a6c3371

Browse files
authored
use c++20 on webrtc builds (#162)
1 parent 4fb5213 commit a6c3371

7 files changed

Lines changed: 25 additions & 14 deletions

File tree

webrtc-sys/libwebrtc/.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ depot_tools
55
ninja
66

77
# builds
8-
win*
9-
mac*
10-
linux*
11-
android*
12-
ios*
8+
win-*
9+
mac-*
10+
linux-*
11+
android-*
12+
ios-*

webrtc-sys/libwebrtc/build_android.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ args="is_debug=$debug \
9898
rtc_use_pipewire=false \
9999
symbol_level=0 \
100100
enable_iterator_debugging=false \
101-
use_rtti=true \
102-
use_cxx17=true"
101+
use_rtti=true"
103102

104103
if [ "$debug" = "true" ]; then
105104
args="${args} is_asan=true is_lsan=true";

webrtc-sys/libwebrtc/build_ios.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ gn gen "$OUTPUT_DIR" --root="src" \
112112
use_custom_libcxx=false \
113113
clang_use_chrome_plugins=false \
114114
use_rtti=true \
115-
use_lld=false \
116-
use_cxx17=true"
115+
use_lld=false"
117116

118117
# build static library
119118
ninja -C "$OUTPUT_DIR" :default \

webrtc-sys/libwebrtc/build_linux.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ args="is_debug=$debug \
9999
symbol_level=0 \
100100
enable_iterator_debugging=false \
101101
use_rtti=true \
102-
rtc_use_x11=false \
103-
use_cxx17=true"
102+
rtc_use_x11=false"
104103

105104
if [ "$debug" = "true" ]; then
106105
args="${args} is_asan=true is_lsan=true";

webrtc-sys/libwebrtc/build_macos.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ gn gen "$OUTPUT_DIR" --root="src" \
100100
use_custom_libcxx=false \
101101
clang_use_chrome_plugins=false \
102102
use_rtti=true \
103-
use_lld=false \
104-
use_cxx17=true"
103+
use_lld=false"
105104

106105
# build static library
107106
ninja -C "$OUTPUT_DIR" :default \

webrtc-sys/libwebrtc/build_windows.cmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if not exist src (
5252
cd src
5353
call git apply "%COMMAND_DIR%/patches/add_licenses.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
5454
call git apply "%COMMAND_DIR%/patches/add_deps.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
55+
call git apply "%COMMAND_DIR%/patches/windows_silence_warnings.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
5556
call git apply "%COMMAND_DIR%/patches/ssl_verify_callback_with_native_handle.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
5657
cd ..
5758

@@ -64,7 +65,7 @@ if "!profile!" == "debug" (
6465

6566
rem generate ninja for release
6667
call gn.bat gen %OUTPUT_DIR% --root="src" ^
67-
--args="is_debug=!debug! is_clang=true target_cpu=\"!arch!\" use_custom_libcxx=false rtc_include_tests=false rtc_build_examples=false rtc_build_tools=false is_component_build=false rtc_enable_protobuf=false rtc_use_h264=true symbol_level=0 enable_iterator_debugging=false use_cxx17=true"
68+
--args="is_debug=!debug! is_clang=true target_cpu=\"!arch!\" use_custom_libcxx=false rtc_include_tests=false rtc_build_examples=false rtc_build_tools=false is_component_build=false rtc_enable_protobuf=false rtc_use_h264=true symbol_level=0 enable_iterator_debugging=false"
6869

6970
rem build
7071
ninja.exe -C %OUTPUT_DIR% :default
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
2+
index 8048ec5e8..4e00f7e53 100644
3+
--- a/build/config/compiler/BUILD.gn
4+
+++ b/build/config/compiler/BUILD.gn
5+
@@ -1424,6 +1424,9 @@ config("default_warnings") {
6+
# gethostbyname. Fires mostly in non-Chromium code. We probably
7+
# want to remove this define eventually.
8+
"_WINSOCK_DEPRECATED_NO_WARNINGS",
9+
+
10+
+ "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS",
11+
+ "_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS",
12+
]
13+
if (!is_clang) {
14+
# TODO(thakis): Remove this once

0 commit comments

Comments
 (0)