OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//third_party/libvpx/libvpx_srcs.gni") | 7 import("//third_party/libvpx/libvpx_srcs.gni") |
8 import("//third_party/yasm/yasm_assemble.gni") | 8 import("//third_party/yasm/yasm_assemble.gni") |
9 | 9 |
10 if (is_posix && !is_mac) { | 10 if (is_posix && !is_mac) { |
(...skipping 23 matching lines...) Expand all Loading... | |
34 cpu_arch_full = cpu_arch | 34 cpu_arch_full = cpu_arch |
35 } | 35 } |
36 | 36 |
37 config("libvpx_config") { | 37 config("libvpx_config") { |
38 include_dirs = [ | 38 include_dirs = [ |
39 "//third_party/libvpx/source/config", | 39 "//third_party/libvpx/source/config", |
40 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full", | 40 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full", |
41 "//third_party/libvpx/source/libvpx", | 41 "//third_party/libvpx/source/libvpx", |
42 "$root_gen_dir/third_party/libvpx", # Provides vpx_rtcd.h. | 42 "$root_gen_dir/third_party/libvpx", # Provides vpx_rtcd.h. |
43 ] | 43 ] |
44 cflags = [ "-Wno-unused-function", "-Wno-sign-compare" ] | 44 if (is_win) { |
45 cflags = [ | |
46 "/wd4057", | |
Johann
2014/09/25 21:00:25
We (try) to track Windows errors pretty carefully
| |
47 "/wd4201", | |
48 "/wd4204", | |
49 "/wd4221", | |
50 "/wd4245", | |
51 "/wd4324", | |
52 "/wd4389", | |
53 "/wd4701", | |
54 "/wd4706", | |
55 ] | |
56 } else { | |
57 cflags = [ "-Wno-unused-function", "-Wno-sign-compare" ] | |
58 } | |
45 } | 59 } |
46 | 60 |
47 # This config is applied to targets that depend on libvpx. | 61 # This config is applied to targets that depend on libvpx. |
48 config("libvpx_external_config") { | 62 config("libvpx_external_config") { |
49 include_dirs = [ | 63 include_dirs = [ |
50 "//third_party/libvpx/source/libvpx", | 64 "//third_party/libvpx/source/libvpx", |
51 ] | 65 ] |
52 } | 66 } |
53 | 67 |
54 executable("libvpx_obj_int_extract") { | 68 executable("libvpx_obj_int_extract") { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 "/libvpx_obj_int_extract", | 100 "/libvpx_obj_int_extract", |
87 root_build_dir) | 101 root_build_dir) |
88 ] | 102 ] |
89 | 103 |
90 if (cpu_arch == "arm") { | 104 if (cpu_arch == "arm") { |
91 args += [ "-f", "gas" ] | 105 args += [ "-f", "gas" ] |
92 } else { | 106 } else { |
93 args += [ "-f", "rvds" ] | 107 args += [ "-f", "rvds" ] |
94 } | 108 } |
95 | 109 |
110 if (is_win) { | |
111 obj_extension = "obj" | |
112 } else { | |
113 obj_extension = "o" | |
114 } | |
115 | |
96 args += [ | 116 args += [ |
97 "-b", | 117 "-b", |
98 rebase_path(get_label_info(":libvpx_asm_offsets", "target_out_dir")) + | 118 rebase_path(get_label_info(":libvpx_asm_offsets", "target_out_dir")) + |
99 "/" + invoker.src_dir + "/libvpx_asm_offsets." + | 119 "/" + invoker.src_dir + "/libvpx_asm_offsets." + |
100 invoker.obj_file_root + ".o" | 120 invoker.obj_file_root + ".${obj_extension}" |
101 ] | 121 ] |
102 out_file = "$target_gen_dir/" + invoker.obj_file_root + ".asm" | 122 out_file = "$target_gen_dir/" + invoker.obj_file_root + ".asm" |
103 args += [ "-o", rebase_path(out_file) ] | 123 args += [ "-o", rebase_path(out_file) ] |
104 outputs = [ out_file ] | 124 outputs = [ out_file ] |
105 deps = [ | 125 deps = [ |
106 ":libvpx_asm_offsets", | 126 ":libvpx_asm_offsets", |
107 ":libvpx_obj_int_extract($host_toolchain)" | 127 ":libvpx_obj_int_extract($host_toolchain)" |
108 ] | 128 ] |
109 } | 129 } |
110 } | 130 } |
(...skipping 25 matching lines...) Expand all Loading... | |
136 ] | 156 ] |
137 deps = [ | 157 deps = [ |
138 ":gen_asm_offsets_vp8", | 158 ":gen_asm_offsets_vp8", |
139 ":gen_asm_offsets_scale", | 159 ":gen_asm_offsets_scale", |
140 ] | 160 ] |
141 } | 161 } |
142 } | 162 } |
143 | 163 |
144 static_library("libvpx_intrinsics_mmx") { | 164 static_library("libvpx_intrinsics_mmx") { |
145 configs += [ ":libvpx_config" ] | 165 configs += [ ":libvpx_config" ] |
146 cflags = [ "-mmmx" ] | 166 if (!is_win) { |
167 cflags = [ "-mmmx" ] | |
168 } | |
147 if (cpu_arch == "x86") { | 169 if (cpu_arch == "x86") { |
148 sources = libvpx_srcs_x86_mmx | 170 sources = libvpx_srcs_x86_mmx |
149 } else if (cpu_arch == "x64") { | 171 } else if (cpu_arch == "x64") { |
150 sources = libvpx_srcs_x86_64_mmx | 172 sources = libvpx_srcs_x86_64_mmx |
151 } | 173 } |
152 } | 174 } |
153 | 175 |
154 static_library("libvpx_intrinsics_sse2") { | 176 static_library("libvpx_intrinsics_sse2") { |
155 configs += [ ":libvpx_config" ] | 177 configs += [ ":libvpx_config" ] |
156 cflags = [ "-msse2" ] | 178 if (!is_win) { |
179 cflags = [ "-msse2" ] | |
180 } | |
157 if (cpu_arch == "x86") { | 181 if (cpu_arch == "x86") { |
158 sources = libvpx_srcs_x86_sse2 | 182 sources = libvpx_srcs_x86_sse2 |
159 } else if (cpu_arch == "x64") { | 183 } else if (cpu_arch == "x64") { |
160 sources = libvpx_srcs_x86_64_sse2 | 184 sources = libvpx_srcs_x86_64_sse2 |
161 } | 185 } |
162 } | 186 } |
163 | 187 |
164 static_library("libvpx_intrinsics_ssse3") { | 188 static_library("libvpx_intrinsics_ssse3") { |
165 configs += [ ":libvpx_config" ] | 189 configs += [ ":libvpx_config" ] |
166 cflags = [ "-mssse3" ] | 190 if (!is_win) { |
191 cflags = [ "-mssse3" ] | |
192 } | |
167 if (cpu_arch == "x86") { | 193 if (cpu_arch == "x86") { |
168 sources = libvpx_srcs_x86_ssse3 | 194 sources = libvpx_srcs_x86_ssse3 |
169 } else if (cpu_arch == "x64") { | 195 } else if (cpu_arch == "x64") { |
170 sources = libvpx_srcs_x86_64_ssse3 | 196 sources = libvpx_srcs_x86_64_ssse3 |
171 } | 197 } |
172 } | 198 } |
173 | 199 |
174 static_library("libvpx_intrinsics_sse4_1") { | 200 static_library("libvpx_intrinsics_sse4_1") { |
175 configs += [ ":libvpx_config" ] | 201 configs += [ ":libvpx_config" ] |
176 cflags = [ "-msse4.1" ] | 202 if (!is_win) { |
203 cflags = [ "-msse4.1" ] | |
204 } | |
177 if (cpu_arch == "x86") { | 205 if (cpu_arch == "x86") { |
178 sources = libvpx_srcs_x86_sse4_1 | 206 sources = libvpx_srcs_x86_sse4_1 |
179 } else if (cpu_arch == "x64") { | 207 } else if (cpu_arch == "x64") { |
180 sources = libvpx_srcs_x86_64_sse4_1 | 208 sources = libvpx_srcs_x86_64_sse4_1 |
181 } | 209 } |
182 } | 210 } |
183 | 211 |
184 if (cpu_arch_full == "arm-neon-cpu-detect") { | 212 if (cpu_arch_full == "arm-neon-cpu-detect") { |
185 static_library("libvpx_intrinsics_neon") { | 213 static_library("libvpx_intrinsics_neon") { |
186 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 214 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 } | 298 } |
271 if (is_android) { | 299 if (is_android) { |
272 deps += [ "//third_party/android_tools:cpu_features" ] | 300 deps += [ "//third_party/android_tools:cpu_features" ] |
273 } | 301 } |
274 if (cpu_arch == "arm") { | 302 if (cpu_arch == "arm") { |
275 deps += [ ":libvpx_assembly_arm" ] | 303 deps += [ ":libvpx_assembly_arm" ] |
276 } | 304 } |
277 | 305 |
278 public_configs = [ ":libvpx_external_config" ] | 306 public_configs = [ ":libvpx_external_config" ] |
279 } | 307 } |
OLD | NEW |