• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This step is only required for ARM. MIPS uses intrinsics exclusively and x86
2// requires 'yasm' to pre-process its assembly files.
3// The ARM assembly sources must be converted from ADS to GAS compatible format.
4gensrcs {
5    name: "libvpx_arm_neon_asm_srcs_converted",
6    srcs: libvpx_arm_neon_asm_srcs,
7    tool_files: [
8        "libvpx/build/make/ads2gas.pl",
9        "libvpx/build/make/thumb.pm",
10    ],
11    output_extension: "asm.S",
12    cmd: "cat $(in) | perl $(location libvpx/build/make/ads2gas.pl) > $(out)",
13    export_include_dirs: ["libvpx"],
14}
15
16cc_library_static {
17    name: "libvpx",
18    vendor_available: true,
19
20    arch: {
21        arm: {
22            // Clang arm assembler cannot compile libvpx .S files yet.
23            clang_asflags: ["-no-integrated-as"],
24
25            // Want arm, not thumb, optimized
26            instruction_set: "arm",
27
28            srcs: libvpx_arm_c_srcs,
29            local_include_dirs: ["config/arm"],
30
31            neon: {
32                exclude_srcs: libvpx_arm_neon_exclude_c_srcs,
33                srcs: libvpx_arm_neon_c_srcs,
34                generated_sources: ["libvpx_arm_neon_asm_srcs_converted"],
35                local_include_dirs: ["config/arm-neon"],
36            },
37        },
38
39        arm64: {
40            srcs: libvpx_arm64_c_srcs,
41            local_include_dirs: ["config/arm64"],
42        },
43
44        mips: {
45            srcs: libvpx_mips32_c_srcs,
46            local_include_dirs: ["config/mips32"],
47
48            dspr2: {
49                exclude_srcs: libvpx_mips32_dspr2_exclude_c_srcs,
50                srcs: libvpx_mips32_dspr2_c_srcs,
51                local_include_dirs: ["config/mips32-dspr2"],
52            },
53
54            msa: {
55                exclude_srcs: libvpx_mips32_msa_exclude_c_srcs,
56                srcs: libvpx_mips32_msa_c_srcs,
57                local_include_dirs: ["config/mips32-msa"],
58            },
59        },
60
61        mips64: {
62            srcs: libvpx_mips64_c_srcs,
63            local_include_dirs: ["config/mips64"],
64
65            msa: {
66                exclude_srcs: libvpx_mips64_msa_exclude_c_srcs,
67                srcs: libvpx_mips64_msa_c_srcs,
68                local_include_dirs: ["config/mips64-msa"],
69            },
70        },
71
72        x86: {
73            srcs: libvpx_x86_c_srcs + libvpx_x86_asm_srcs,
74            local_include_dirs: ["config/x86"],
75        },
76
77        x86_64: {
78            //srcs: libvpx_x86_64_c_srcs + libvpx_x86_64_asm_srcs,
79            //local_include_dirs: ["config/x86_64"],
80            srcs: libvpx_generic_c_srcs,
81            local_include_dirs: ["config/generic"],
82        },
83    },
84
85    cflags: [
86        "-O3",
87        "-Wno-unused-parameter",
88    ],
89
90    export_include_dirs: ["libvpx"],
91
92    sanitize: {
93        cfi: true,
94        diag: {
95            cfi: true,
96        },
97        blacklist: "cfi_blacklist.txt",
98    },
99}
100
101subdirs = [
102    "libwebm",
103]
104