Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Issue 2492713003: Added a public GN config to compile mock headers. (Closed)

Created:
4 years, 1 month ago by aleloi
Modified:
4 years, 1 month ago
Reviewers:
ivoc, henrika_webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, audio-team_agora.io, sdk-team_agora.io, peah-webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Added a public GN config to compile mock headers. Due to bugs.webrtc.org/216 code that includes //webrtc/modules/audio_device:mock_audio_device fails to compile on Windows unless a warning flag is switched off. It seems that googlemock changes types of overridden virtual method parameters from 'const int' to 'int', which causes the VS compiler to report an error. The problem was not solved by suppressing the flag wd4373 in //webrtc/modules/audio_device:mock_audio_device, because targets that include the headers are compiled separately. This CL adds the flag suppression to the GN variable |all_dependent_configs|. Then GN will apply the configuration to all reachable dependencies. This is needed to reduce clutter and extra conditions in dependency build targets. The reason for |all_dependent_configs| before |public_configs| is for a situation in which a targets headers include the headers from this target. Then dependencies of dependencies will have a copy of this targets' code after preprocessing, and compilation will fail. This will happen if we e.g. change mock_voice_engine to return a MockAudioTransport or MockAudioDevice. This change has been tested by compiling a dependent CL (https://codereview.webrtc.org/2454373002/) which uses these mocks on Windows without suppressing the flag. There is no GYP change, because test code has been removed from GYP. NOTRY=True BUG=webrtc:216 Committed: https://crrev.com/44c7ecf88e4218d287e1ab55236d28ca5ec19f87 Cr-Commit-Position: refs/heads/master@{#15024}

Patch Set 1 : changed to all_dependent_configs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -8 lines) Patch
M webrtc/modules/audio_device/BUILD.gn View 2 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
aleloi
Hi @henrika! Same issue once again:) I messed up changing compiler flags slightly last time. ...
4 years, 1 month ago (2016-11-10 16:02:09 UTC) #6
henrika_webrtc
I have very little experience from GN (zero actually) but it looks OK from my ...
4 years, 1 month ago (2016-11-10 16:05:44 UTC) #8
aleloi
4 years, 1 month ago (2016-11-10 16:09:45 UTC) #10
ivoc
LGTM. One nit: I think there is a missing word in the CL description here: ...
4 years, 1 month ago (2016-11-10 16:14:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2492713003/20001
4 years, 1 month ago (2016-11-10 16:15:11 UTC) #14
aleloi
On 2016/11/10 16:14:05, ivoc wrote: > LGTM. > One nit: I think there is a ...
4 years, 1 month ago (2016-11-10 16:15:31 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 1 month ago (2016-11-10 16:16:28 UTC) #17
commit-bot: I haz the power
4 years, 1 month ago (2016-11-10 16:16:39 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/44c7ecf88e4218d287e1ab55236d28ca5ec19f87
Cr-Commit-Position: refs/heads/master@{#15024}

Powered by Google App Engine
This is Rietveld 408576698