Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: build/secondary/third_party/libjpeg_turbo/BUILD.gn

Issue 1705523002: Remove libjpeg and libjpeg_turbo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | mojo/tools/mopy/gn.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 # Do not use the targets in this file unless you need a certain libjpeg
6 # implementation. Use the meta target //third_party:jpeg instead.
7
8 if (current_cpu == "arm") {
9 import("//build/config/arm.gni")
10 }
11
12 if (current_cpu == "x86" || current_cpu == "x64") {
13 import("//third_party/yasm/yasm_assemble.gni")
14
15 yasm_assemble("simd_asm") {
16 defines = []
17
18 if (current_cpu == "x86") {
19 sources = [
20 "simd/jccolmmx.asm",
21 "simd/jccolss2.asm",
22 "simd/jcgrammx.asm",
23 "simd/jcgrass2.asm",
24 "simd/jcqnt3dn.asm",
25 "simd/jcqntmmx.asm",
26 "simd/jcqnts2f.asm",
27 "simd/jcqnts2i.asm",
28 "simd/jcqntsse.asm",
29 "simd/jcsammmx.asm",
30 "simd/jcsamss2.asm",
31 "simd/jdcolmmx.asm",
32 "simd/jdcolss2.asm",
33 "simd/jdmermmx.asm",
34 "simd/jdmerss2.asm",
35 "simd/jdsammmx.asm",
36 "simd/jdsamss2.asm",
37 "simd/jf3dnflt.asm",
38 "simd/jfmmxfst.asm",
39 "simd/jfmmxint.asm",
40 "simd/jfss2fst.asm",
41 "simd/jfss2int.asm",
42 "simd/jfsseflt.asm",
43 "simd/ji3dnflt.asm",
44 "simd/jimmxfst.asm",
45 "simd/jimmxint.asm",
46 "simd/jimmxred.asm",
47 "simd/jiss2flt.asm",
48 "simd/jiss2fst.asm",
49 "simd/jiss2int.asm",
50 "simd/jiss2red.asm",
51 "simd/jisseflt.asm",
52 "simd/jsimdcpu.asm",
53 ]
54 defines += [ "__x86__" ]
55 } else if (current_cpu == "x64") {
56 sources = [
57 "simd/jccolss2-64.asm",
58 "simd/jcgrass2-64.asm",
59 "simd/jcqnts2f-64.asm",
60 "simd/jcqnts2i-64.asm",
61 "simd/jcsamss2-64.asm",
62 "simd/jdcolss2-64.asm",
63 "simd/jdmerss2-64.asm",
64 "simd/jdsamss2-64.asm",
65 "simd/jfss2fst-64.asm",
66 "simd/jfss2int-64.asm",
67 "simd/jfsseflt-64.asm",
68 "simd/jiss2flt-64.asm",
69 "simd/jiss2fst-64.asm",
70 "simd/jiss2int-64.asm",
71 "simd/jiss2red-64.asm",
72 ]
73 defines += [ "__x86_64__" ]
74 }
75
76 if (is_mac) {
77 defines += [ "MACHO" ]
78 include_dirs = [ "mac" ]
79 } else if (is_linux || is_android) {
80 defines += [ "ELF" ]
81 include_dirs = [ "linux" ]
82 }
83 }
84 }
85
86 source_set("simd") {
87 if (current_cpu == "x86") {
88 deps = [
89 ":simd_asm",
90 ]
91 sources = [
92 "simd/jsimd_i386.c",
93 ]
94 } else if (current_cpu == "x64") {
95 deps = [
96 ":simd_asm",
97 ]
98 sources = [
99 "simd/jsimd_x86_64.c",
100 ]
101 } else if (current_cpu == "arm" && arm_version >= 7 &&
102 (arm_use_neon || arm_optionally_use_neon)) {
103 sources = [
104 "simd/jsimd_arm.c",
105 "simd/jsimd_arm_neon.S",
106 ]
107 } else {
108 sources = [
109 "jsimd_none.c",
110 ]
111 }
112 }
113
114 config("libjpeg_config") {
115 include_dirs = [ "." ]
116 }
117
118 source_set("libjpeg") {
119 sources = [
120 "jcapimin.c",
121 "jcapistd.c",
122 "jccoefct.c",
123 "jccolor.c",
124 "jcdctmgr.c",
125 "jchuff.c",
126 "jchuff.h",
127 "jcinit.c",
128 "jcmainct.c",
129 "jcmarker.c",
130 "jcmaster.c",
131 "jcomapi.c",
132 "jconfig.h",
133 "jcparam.c",
134 "jcphuff.c",
135 "jcprepct.c",
136 "jcsample.c",
137 "jdapimin.c",
138 "jdapistd.c",
139 "jdatadst.c",
140 "jdatasrc.c",
141 "jdcoefct.c",
142 "jdcolor.c",
143 "jdct.h",
144 "jddctmgr.c",
145 "jdhuff.c",
146 "jdhuff.h",
147 "jdinput.c",
148 "jdmainct.c",
149 "jdmarker.c",
150 "jdmaster.c",
151 "jdmerge.c",
152 "jdphuff.c",
153 "jdpostct.c",
154 "jdsample.c",
155 "jerror.c",
156 "jerror.h",
157 "jfdctflt.c",
158 "jfdctfst.c",
159 "jfdctint.c",
160 "jidctflt.c",
161 "jidctfst.c",
162 "jidctint.c",
163 "jidctred.c",
164 "jinclude.h",
165 "jmemmgr.c",
166 "jmemnobs.c",
167 "jmemsys.h",
168 "jmorecfg.h",
169 "jpegint.h",
170 "jpeglib.h",
171 "jpeglibmangler.h",
172 "jquant1.c",
173 "jquant2.c",
174 "jutils.c",
175 "jversion.h",
176 ]
177
178 defines = [
179 "WITH_SIMD",
180 "MOTION_JPEG_SUPPORTED",
181 "NO_GETENV",
182 ]
183
184 configs += [ ":libjpeg_config" ]
185
186 public_configs = [ ":libjpeg_config" ]
187
188 # MemorySanitizer doesn't support assembly code, so keep it disabled in
189 # MSan builds for now.
190 # TODO: Enable on Linux when .asm files are recognized.
191 if (is_msan || is_linux) {
192 sources += [ "jsimd_none.c" ]
193 } else {
194 deps = [
195 ":simd",
196 ]
197 }
198
199 # TODO(GYP): Compile the .asm files with YASM as GYP does.
200 }
OLDNEW
« no previous file with comments | « DEPS ('k') | mojo/tools/mopy/gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698