GN: Support for disabling libvpx codecs (VP8, VP9) |
|||||
Issue descriptionGYP has a libvpx_build_vp9 variable that allows the user to build libvpx without VP9 support. This has significant impact on the binary size, especially for mobile platforms. GN doesn't have this, probably because it lacks the functionality to exclude sources using wildcard patterns (https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md). Since the libvpx_srcs.gni file is generated by https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libvpx/generate_gypi.sh&l=317, it seems doable to split out the vp9 sources into a separate .gni file, allowing for the existence of a similar libvpx_build_vp9 variable in https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libvpx/BUILD.gn I'm filing this in relation to https://bugs.chromium.org/p/webrtc/issues/detail?id=5884, which handles this for the GYP build of WebRTC.
,
May 17 2016
The main short-term goal is only Android ARM (possibly Android x86 too but definitely not important in the short term). If we do only the config approach, won't all objects be compiled anyway? Would VP9 be trimmed away at link time then?
,
May 17 2016
No, I mean adding a configure target with --disable-vp9, which would build a file list which correctly excludes vp9 and has the #defines set correctly
,
May 17 2016
Sounds good. Can you create such gen_config_files configs for that permutation in generate_gypi.sh?
,
May 17 2016
Is it possible or do you want me to do it? Which config do you want? As I've mentioned before, I think the cpu detect version of the arm build should go away.
,
May 19 2016
I created a CL for duplicating the arm-neon and arm64 configurations: https://codereview.chromium.org/1997603002/ Mostly to check that it's possible to do so with the GN build. We can leave this open until there's a real need for this from WebRTC's perspective.
,
May 19 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 22 2017
With recent discussions about making it possible to exclude the VP9 codec in our builds, I'm thinking we might want do to this? I don't see any variables for either choosing VP8 or VP9 in https://cs.chromium.org/chromium/src/third_party/libvpx/BUILD.gn so I updated the title a bit. Magnus: what do you say? If yes, please assign the bug to johannkoenig@ for more input.
,
May 22 2017
,
Sep 5 2017
You can disable VP9 from the build, rtc_libvpx_build_vp9, and to include/exclude libvpx, rtc_build_libvpx. There is no flag to disable VP8 wrappers though. Erik, Assignign to you for prioritization. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by johannko...@google.com
, May 16 2016