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

Issue 2441383002: GN: New conventions, default target and refactorings (Closed)

Created:
4 years, 1 month ago by kjellander_webrtc
Modified:
4 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), kwiberg-webrtc, Andrew MacDonald, hlundin-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, qiang.lu, niklas.enbom, peah-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

GN: New conventions, default target and refactorings Introduce a convention on categorizing GN targets: 1. Production code 2. Tests 3. Examples 4. Tools The first two have targets spread out all over the tree, while the latter are isolated to examples/ and tools/ directories. Another new convention: Each directory's BUILD.gn file shall contain a target named similar to the directory name. This target shall contain the 'most common' production code, i.e. so that most consumers of the directory can depend on only the directory (which implicitly means that target in GN). //webrtc:webrtc_tests is changed to depend on all WebRTC tests. From now on, it's necessary to add new test targets to this dependency tree in order to get them compiled. Two new group targets are created: //webrtc/modules/audio_coding:audio_coding_tests //webrtc/modules/audio_processing:audio_processing_tests to reduce the long list of tests in //webrtc:webrtc_tests. Visibility on //webrtc:webrtc and //webrtc:webrtc_tests is restricted to the root target, to avoid circular dependencies due to the monolithic property of these targets (a problem we've had in the past). The 'root' target at the top level is renamed to 'default', which means GN will build this target instead of _all_ generated targets (see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default). This target now depends on everything we want to build, meaning all targets now explicitly needs to be wired up from the root target in order to get build. Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build. BUG=webrtc:6440 TESTED=git cl try --clobber NOTRY=True Committed: https://crrev.com/6ceab083225dfa485bb48f9e43231c216acccbaf Cr-Commit-Position: refs/heads/master@{#14821}

Patch Set 1 : Patch set for Chromium tryjobs #

Patch Set 2 : Add root change for WebRTC trybots #

Patch Set 3 : Rebased #

Patch Set 4 : Restored some of webrtc and webrtc_tests, restricted visibility #

Patch Set 5 : Readded lost dep: modules/video_capture:video_capture_internal_impl #

Patch Set 6 : Fixed video_capture_tests #

Patch Set 7 : Removing root BUILD.gn file for Chromium tryjobs again #

Patch Set 8 : Restored root BUILD.gn for submit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -43 lines) Patch
M BUILD.gn View 1 2 3 7 1 chunk +4 lines, -2 lines 0 comments Download
M webrtc/BUILD.gn View 1 2 3 4 5 3 chunks +67 lines, -25 lines 0 comments Download
M webrtc/api/BUILD.gn View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/base/BUILD.gn View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M webrtc/examples/BUILD.gn View 1 2 1 chunk +11 lines, -1 line 0 comments Download
M webrtc/logging/BUILD.gn View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M webrtc/modules/BUILD.gn View 1 2 3 chunks +7 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/BUILD.gn View 1 2 3 chunks +38 lines, -2 lines 0 comments Download
M webrtc/modules/audio_mixer/BUILD.gn View 1 chunk +7 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/BUILD.gn View 1 chunk +20 lines, -0 lines 0 comments Download
M webrtc/p2p/BUILD.gn View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/sdk/BUILD.gn View 1 chunk +8 lines, -0 lines 0 comments Download
M webrtc/tools/BUILD.gn View 3 chunks +25 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
kjellander_webrtc
Will run WebRTC tryjobs in PS#2.
4 years, 1 month ago (2016-10-24 11:15:51 UTC) #3
kjellander_webrtc
On 2016/10/24 11:15:51, kjellander_webrtc wrote: > Will run WebRTC tryjobs in PS#2. The baremetal failure ...
4 years, 1 month ago (2016-10-24 12:53:53 UTC) #7
ehmaldonado_chromium
On 2016/10/24 12:53:53, kjellander_webrtc wrote: > On 2016/10/24 11:15:51, kjellander_webrtc wrote: > > Will run ...
4 years, 1 month ago (2016-10-24 13:00:20 UTC) #8
kjellander_webrtc
On 2016/10/24 13:00:20, ehmaldonado_chromium wrote: > On 2016/10/24 12:53:53, kjellander_webrtc wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-26 11:09:15 UTC) #9
ehmaldonado_webrtc
On 2016/10/26 11:09:15, kjellander_webrtc wrote: > On 2016/10/24 13:00:20, ehmaldonado_chromium wrote: > > On 2016/10/24 ...
4 years, 1 month ago (2016-10-26 11:09:46 UTC) #10
kjellander_webrtc
+henrik.lundin@ mostly FYI for the new group targets in //webrtc/modules/audio_coding and //webrtc/modules/audio_processing. I'll send an ...
4 years, 1 month ago (2016-10-28 07:12:38 UTC) #14
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/2441383002/160001
4 years, 1 month ago (2016-10-28 12:39:50 UTC) #18
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/2441383002/160001
4 years, 1 month ago (2016-10-28 12:42:30 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 1 month ago (2016-10-28 12:44:06 UTC) #24
commit-bot: I haz the power
4 years, 1 month ago (2016-10-28 12:44:11 UTC) #26
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6ceab083225dfa485bb48f9e43231c216acccbaf
Cr-Commit-Position: refs/heads/master@{#14821}

Powered by Google App Engine
This is Rietveld 408576698