From 20574f48b540053438600543ae4cbb16203fb4ec Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 28 Mar 2019 07:50:07 +0100 Subject: [PATCH] Testing no /DUNICODE assumptions with Win more configs bots. This CL will avoid regressions after the cleanup done in https://webrtc-review.googlesource.com/c/src/+/128904. Bug: None Change-Id: Id01f554a6fb0972139e7810b7523c91321398c0f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130100 Reviewed-by: Oleh Prypin Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#27328} --- BUILD.gn | 7 +++++++ tools_webrtc/mb/mb_config.pyl | 12 ++++++++---- webrtc.gni | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index f1ac0bb32b..f299446d45 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -361,6 +361,13 @@ config("common_config") { # Used in Chromium's overrides to disable logging defines += [ "WEBRTC_UNSAFE_FUZZER_MODE" ] } + + if (!build_with_chromium && rtc_win_undef_unicode) { + cflags += [ + "/UUNICODE", + "/U_UNICODE", + ] + } } config("common_objc") { diff --git a/tools_webrtc/mb/mb_config.pyl b/tools_webrtc/mb/mb_config.pyl index e468bb0c95..b452f74ee2 100644 --- a/tools_webrtc/mb/mb_config.pyl +++ b/tools_webrtc/mb/mb_config.pyl @@ -99,7 +99,7 @@ 'dummy_audio_file_devices_no_protobuf': 'dummy_audio_file_devices_no_protobuf_x86', 'rtti_no_sctp': - 'rtti_no_sctp_x86', + 'rtti_no_sctp_no_unicode_win_x86', }, }, 'client.webrtc.perf': { @@ -241,7 +241,7 @@ 'dummy_audio_file_devices_no_protobuf': 'dummy_audio_file_devices_no_protobuf_x86', 'rtti_no_sctp': - 'rtti_no_sctp_x86', + 'rtti_no_sctp_no_unicode_win_x86', }, } }, @@ -432,8 +432,8 @@ 'dummy_audio_file_devices_no_protobuf_x86': [ 'debug_bot', 'x86', 'dummy_audio_file_devices', 'no_protobuf' ], - 'rtti_no_sctp_x86': [ - 'debug_bot', 'x86', 'rtti', 'no_sctp' + 'rtti_no_sctp_no_unicode_win_x86': [ + 'debug_bot', 'x86', 'rtti', 'no_sctp', 'win_undef_unicode' ], 'bwe_test_logging_android_arm': [ @@ -627,5 +627,9 @@ 'winuwp': { 'gn_args': 'target_os="winuwp"', }, + + 'win_undef_unicode': { + 'gn_args': 'rtc_win_undef_unicode=true', + }, }, } diff --git a/webrtc.gni b/webrtc.gni index 3a89a9a9c7..6ba8d0aeb3 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -187,6 +187,14 @@ declare_args() { # (they will still be included in libjingle_peerconnection_so.so and # WebRTC.framework) rtc_include_builtin_video_codecs = true + + # When set to true and in a standalone build, it will undefine UNICODE and + # _UNICODE (which are always defined globally by the Chromium Windows + # toolchain). + # This is only needed for testing purposes, WebRTC wants to be sure it + # doesn't assume /DUNICODE and /D_UNICODE but that it explicitly uses + # wide character functions. + rtc_win_undef_unicode = false } if (!build_with_mozilla) {