[third_party/ffmpeg] merge some old changes to BUILD.gn
BUILD.gn and other files for ffmpeg have been rebuilt from a recent
version from Chromium. A couple of important changes were lost and
are restored here.
fxr/610499: [build] Explicitly include "novariant" variant
fxr/508076: [build] Always optimize the build for speed
Test: build issue
Change-Id: Id84007ad4279ef5fec50b178143e1c33edb5a8ac
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/ffmpeg/+/746922
Reviewed-by: Nathan Mulcahey <nmulcahey@google.com>
Reviewed-by: Gulfem Savrun Yeniceri <gulfem@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index bf425c7..a45fbcd 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -185,19 +185,14 @@
":ffmpegsumo_warnings",
]
- # Since we are not often debugging FFmpeg, and performance is
- # unacceptable without optimization, freeze the optimizations to -O2.
- # If someone really wants -O1 , they can change these in their checkout.
- # If you want -O0, see the Gotchas in README.fuchsia for why that
- # won't work.
+ # Since we are not often debugging FFmpeg, and performance is unacceptable
+ # without optimization, we always optimize for speed.
#
# In addition to the above reasons, /Od optimization won't remove symbols
# that are under "if (0)" style sections. Which lead to link time errors
# when for example it tries to link an ARM symbol on X86.
- if (is_debug) {
- configs -= [ "//build/config:debug" ]
- configs += [ "//build/config:release" ]
- }
+ configs -= [ "//build/config:default_optimize" ]
+ configs += [ "//build/config:optimize_speed" ]
# Make all symbols visible.
configs -= [ "//build/config:symbol_visibility_hidden" ]
@@ -240,7 +235,11 @@
group("ffmpeg_variants") {
deps = []
- foreach(variant, select_variant) {
+ _variants = select_variant
+ if (select_variant != []) {
+ _variants += ["novariant"]
+ }
+ foreach(variant, _variants) {
deps += [ ":ffmpeg(${toolchain_variant.base}-${variant}-shared)" ]
}
-}
+}
\ No newline at end of file