File: ffmpeg_options.gni

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (70 lines) | stat: -rw-r--r-- 2,483 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/arm.gni")
import("//build/config/cast.gni")
import("//build/config/chrome_build.gni")
import("//build/config/sanitizers/sanitizers.gni")

if (is_chrome_branded || is_chrome_for_testing_branded) {
  _default_ffmpeg_branding = "Chrome"
} else {
  _default_ffmpeg_branding = "Chromium"
}

if (is_cast_android || is_castos) {
  _default_ffmpeg_branding = "Chrome"
}

declare_args() {
  # Controls whether we build the Chromium or Google Chrome version of FFmpeg.
  # The Google Chrome version contains additional codecs. Typical values are
  # Chromium, Chrome, and ChromeOS.
  ffmpeg_branding = _default_ffmpeg_branding

  # Set true to build ffmpeg as a shared library. NOTE: this means we should
  # always consult is_component_ffmpeg instead of is_component_build for
  # ffmpeg targets. This helps linux chromium packagers that swap out our
  # ffmpeg.so with their own. See discussion here
  # https://groups.google.com/a/chromium.org/forum/#!msg/chromium-packagers/R5rcZXWxBEQ/B6k0zzmJbvcJ
  is_component_ffmpeg = is_component_build

  # Set to true to force the use of ffmpeg's stdatomic fallback code. This code
  # is unsafe and does not implement atomics properly. https://crbug.com/161723.
  #
  # Windows and GCC prior to 4.9 lack stdatomic.h.
  #
  # This is also useful for developers who use icecc, which relies upon
  # clang's -frewrite-includes flag which is broken with #include_next
  # directives as used in chromium's clang stdatomic.h.
  # Some background: https://bugs.llvm.org/show_bug.cgi?id=26828
  ffmpeg_use_unsafe_atomics = false
}

# We no longer have a separate ChromeOS configuration, but don't break existing
# workflows which explicitly specified ChromeOS.
if (ffmpeg_branding == "ChromeOS") {
  ffmpeg_branding = "Chrome"
}

assert(ffmpeg_branding == "Chromium" || ffmpeg_branding == "Chrome")

if (current_cpu == "x86") {
  ffmpeg_arch = "ia32"
} else if (current_cpu == "arm" && arm_version >= 7 && arm_use_neon) {
  ffmpeg_arch = "arm-neon"
} else if (current_cpu == "arm64e") {
  ffmpeg_arch = "arm64"
} else {
  ffmpeg_arch = current_cpu
}

os_config = current_os
if ((is_linux || is_chromeos) && is_msan) {
  os_config = "linux-noasm"
} else if (is_chromeos || is_fuchsia) {
  os_config = "linux"
} else if (is_win && !is_clang) {
  os_config = "win-msvc"
}