blob: 8aec2e13256777a61f9e5a9c8e2707bd0301302d [file] [log] [blame]
msarett1c8a5872015-07-07 08:50:01 -07001# Copyright (c) 2012 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# The yasm build process creates a slew of small C subprograms that
6# dynamically generate files at various point in the build process. This makes
7# the build integration moderately complex.
8#
9# There are three classes of dynamically generated files:
10# 1) C source files that should be included in the build (eg., lc3bid.c)
11# 2) C source files that are #included by static C sources (eg., license.c)
12# 3) Intermediate files that are used as input by other subprograms to
13# further generate files in category #1 or #2. (eg., version.mac)
14#
15# This structure is represented with the following targets:
16# 1) yasm -- Sources, flags for the main yasm executable. Also has most of
17# of the actions and rules that invoke the subprograms.
18# 2) config_sources -- Checked in version of files generated by manually
19# running configure that are used by all binaries.
20# 3) generate_files -- Actions and rules for files of type #3.
21# 4) genperf_libs -- Object files shared between yasm and the genperf
22# subprogram.
23# 5) genmacro, genmodule, etc. -- One executable target for each subprogram.
24#
25# You will notice that a lot of the action targets seem very similar --
26# especially for genmacro invocations. This makes it seem like they should
27# be a rule. The problem is that the correct invocation cannot be inferred
28# purely from the file name, or extension. Nor is it obvious whether the
29# output should be processed as a source or not. Thus, we are left with a
30# large amount of repetitive code.
31
32{
33 'xcode_settings': {
34 'SYMROOT': '<(DEPTH)/xcodebuild',
35 },
36 'variables': {
37 'yasm_include_dirs': [
38 '../third_party/yasm/config/<(skia_os)',
39 '../third_party/externals/yasm/source/patched-yasm',
40 ],
41
42 # The cflags used by any target that will be directly linked into yasm.
43 # These are specifically not used when building the subprograms. While
44 # it would probably be safe to use these flags there as well, the
45 # ./configure based build does not use the same flags between the main
46 # yasm executable, and its subprograms.
47 'yasm_defines': ['HAVE_CONFIG_H'],
48 'yasm_cflags': [
49 '-std=gnu99',
50 '-ansi',
51 '-pedantic',
52 '-w',
53 ],
54
55 # Locations for various generated artifacts.
56 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/yasm',
57 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm',
58
59 # Various files referenced by multiple targets.
60 'version_file': 'version.mac', # Generated by genversion.
61 'genmodule_source': 'genmodule_outfile.c',
62 },
63 'target_defaults': {
64 # Silence warnings in libc++ builds (C code doesn't need this flag).
mtklein6c17ca52015-08-05 08:58:45 -070065 'ldflags!': [ '-stdlib=libc++', '-fsanitize=address,bool,integer-divide-by-zero,null,object-size,return,nonnull-attribute,returns-nonnull-attribute,unreachable,vla-bound' ],
msarett1c8a5872015-07-07 08:50:01 -070066 # https://crbug.com/489901
mtklein6c17ca52015-08-05 08:58:45 -070067 'cflags!': [ '-fsanitize=bounds', '-fsanitize=address,bool,integer-divide-by-zero,null,object-size,return,nonnull-attribute,returns-nonnull-attribute,unreachable,vla-bound' ],
msarettcf2a6a42015-07-21 12:01:48 -070068 'libraries!': [ '-llog', ],
msarett1c8a5872015-07-07 08:50:01 -070069 },
70 'targets': [
71 {
72 'target_name': 'yasm',
73 'type': 'executable',
74 'toolsets': ['host'],
75 'dependencies': [
76 'config_sources',
77 'genmacro',
78 'genmodule',
79 'genperf',
80 'genperf_libs',
81 'generate_files', # Needed to generate gperf and instruction files.
82 'genstring',
83 're2c',
84 ],
85 'variables': {
86 'clang_warning_flags': [
87 # yasm passes a `const elf_machine_sym*` through `void*`.
88 '-Wno-incompatible-pointer-types',
89 ],
90 },
91 'conditions': [
92 ['skia_os == "win"', {
93 # As of VS 2013 Update 3, building this project with /analyze hits an
94 # internal compiler error on elf-x86-amd64.c in release builds with
95 # the amd64_x86 compiler. This halts the build and prevents subsequent
96 # analysis. Therefore, /analyze is disabled for this project. See this
97 # bug for details:
98 # https://connect.microsoft.com/VisualStudio/feedback/details/1014799/internal-compiler-error-when-using-analyze
99 'msvs_settings': {
100 'VCCLCompilerTool': {
101 'AdditionalOptions!': [ '/analyze' ]
102 },
103 },
104 }],
105 ],
106 'sources': [
107 '../third_party/externals/yasm/source/patched-yasm/frontends/yasm/yasm-options.c',
108 '../third_party/externals/yasm/source/patched-yasm/frontends/yasm/yasm.c',
109 '../third_party/externals/yasm/source/patched-yasm/libyasm/assocdat.c',
110 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-align.c',
111 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-data.c',
112 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-incbin.c',
113 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-org.c',
114 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-reserve.c',
115 '../third_party/externals/yasm/source/patched-yasm/libyasm/bitvect.c',
116 '../third_party/externals/yasm/source/patched-yasm/libyasm/bytecode.c',
117 '../third_party/externals/yasm/source/patched-yasm/libyasm/errwarn.c',
118 '../third_party/externals/yasm/source/patched-yasm/libyasm/expr.c',
119 '../third_party/externals/yasm/source/patched-yasm/libyasm/file.c',
120 '../third_party/externals/yasm/source/patched-yasm/libyasm/floatnum.c',
121 '../third_party/externals/yasm/source/patched-yasm/libyasm/hamt.c',
122 '../third_party/externals/yasm/source/patched-yasm/libyasm/insn.c',
123 '../third_party/externals/yasm/source/patched-yasm/libyasm/intnum.c',
124 '../third_party/externals/yasm/source/patched-yasm/libyasm/inttree.c',
125 '../third_party/externals/yasm/source/patched-yasm/libyasm/linemap.c',
126 '../third_party/externals/yasm/source/patched-yasm/libyasm/md5.c',
127 '../third_party/externals/yasm/source/patched-yasm/libyasm/mergesort.c',
128 '../third_party/externals/yasm/source/patched-yasm/libyasm/section.c',
129 '../third_party/externals/yasm/source/patched-yasm/libyasm/strcasecmp.c',
130 '../third_party/externals/yasm/source/patched-yasm/libyasm/strsep.c',
131 '../third_party/externals/yasm/source/patched-yasm/libyasm/symrec.c',
132 '../third_party/externals/yasm/source/patched-yasm/libyasm/valparam.c',
133 '../third_party/externals/yasm/source/patched-yasm/libyasm/value.c',
134 '../third_party/externals/yasm/source/patched-yasm/modules/arch/lc3b/lc3barch.c',
135 '../third_party/externals/yasm/source/patched-yasm/modules/arch/lc3b/lc3bbc.c',
136 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86arch.c',
137 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86bc.c',
138 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86expr.c',
139 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86id.c',
140 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/codeview/cv-dbgfmt.c',
141 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/codeview/cv-symline.c',
142 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/codeview/cv-type.c',
143 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-aranges.c',
144 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c',
145 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-info.c',
146 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-line.c',
147 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/null/null-dbgfmt.c',
148 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/stabs/stabs-dbgfmt.c',
149 '../third_party/externals/yasm/source/patched-yasm/modules/listfmts/nasm/nasm-listfmt.c',
150 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/bin/bin-objfmt.c',
151 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff/coff-objfmt.c',
152 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff/win64-except.c',
153 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/dbg/dbg-objfmt.c',
154 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/elf-objfmt.c',
155 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/elf-x86-amd64.c',
156 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/elf-x86-x86.c',
157 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/elf.c',
158 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/macho/macho-objfmt.c',
159 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/rdf/rdf-objfmt.c',
160 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/xdf/xdf-objfmt.c',
161 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/gas-parse.c',
162 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/gas-parse-intel.c',
163 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/gas-parser.c',
164 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm/nasm-parse.c',
165 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm/nasm-parser.c',
166 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/cpp/cpp-preproc.c',
167 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nasm/nasm-eval.c',
168 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nasm/nasm-pp.c',
169 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c',
170 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nasm/nasmlib.c',
171 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/raw/raw-preproc.c',
172
173 # Sources needed by re2c.
174 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/gas-token.re',
175 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm/nasm-token.re',
176
177 # Sources needed by genperf. Make sure the generated gperf files
178 # (the ones in shared_generated_dir) are synced with the outputs
179 # for the related generate_*_insn actions in the generate_files
180 # target below.
181 '<(shared_generated_dir)/x86insn_nasm.gperf',
182 '<(shared_generated_dir)/x86insn_gas.gperf',
183 '<(shared_generated_dir)/x86cpu.c',
184 '<(shared_generated_dir)/x86regtmod.c',
185 ],
186 'include_dirs': [
187 '<@(yasm_include_dirs)',
188 '<(shared_generated_dir)',
189 '<(generated_dir)',
190 ],
191 'defines': [ '<@(yasm_defines)' ],
192 'cflags': [ '<@(yasm_cflags)', ],
193 'cflags!': [
194 '-mfpu=neon',
195 '-mthumb',
196 '-march=armv7-a',
197 ],
198 'xcode_settings': {
199 'WARNING_CFLAGS': [
200 '-w',
201 ],
202 },
203 'msvs_disabled_warnings': [ 4267 ],
204 'rules': [
205 {
206 'rule_name': 'generate_gperf',
207 'extension': 'gperf',
208 'inputs': [ '<(PRODUCT_DIR)/'
209 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ],
210 'outputs': [
211 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
212 ],
213 'action': ['<(PRODUCT_DIR)/genperf',
214 '<(RULE_INPUT_PATH)',
215 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
216 ],
217 # These files are #included, so do not treat them as sources.
218 'process_outputs_as_sources': 0,
219 'message': 'yasm gperf for <(RULE_INPUT_PATH)',
220 },
221 {
222 'rule_name': 'generate_re2c',
223 'extension': 're',
224 'inputs': [ '<(PRODUCT_DIR)/'
225 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)' ],
226 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ],
227 'action': [
228 '<(PRODUCT_DIR)/re2c',
229 '-b',
230 '-o',
231 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
232 '<(RULE_INPUT_PATH)',
233 ],
234 'process_outputs_as_sources': 1,
235 'message': 'yasm re2c for <(RULE_INPUT_PATH)',
236 },
237 ],
238 'actions': [
239 ###
240 ### genmacro calls.
241 ###
242 {
243 'action_name': 'generate_nasm_macros',
244 'variables': {
245 'infile': '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm/nasm-std.mac',
246 'varname': 'nasm_standard_mac',
247 'outfile': '<(generated_dir)/nasm-macros.c',
248 },
249 'inputs': [ '<(PRODUCT_DIR)/'
250 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)',
251 '<(infile)', ],
252 'outputs': [ '<(outfile)', ],
253 'action': ['<(PRODUCT_DIR)/genmacro',
254 '<(outfile)', '<(varname)', '<(infile)', ],
255 # Not a direct source because this is #included by
256 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c
257 'process_outputs_as_sources': 1,
258 'xcode_settings': {
259 'WARNING_CFLAGS': [
260 '-w',
261 ],
262 },
263 'message': 'yasm genmacro for <(infile)',
264 },
265 {
266 'action_name': 'generate_nasm_version',
267 'variables': {
268 'infile': '<(shared_generated_dir)/<(version_file)',
269 'varname': 'nasm_version_mac',
270 'outfile': '<(generated_dir)/nasm-version.c',
271 },
272 'inputs': [ '<(PRODUCT_DIR)/'
273 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)',
274 '<(infile)', ],
275 'outputs': [ '<(outfile)', ],
276 'action': ['<(PRODUCT_DIR)/genmacro',
277 '<(outfile)', '<(varname)', '<(infile)',
278 ],
279 # Not a direct source because this is #included by
280 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c
281 'process_outputs_as_sources': 0,
282 'message': 'yasm genmacro for <(infile)',
283 },
284 {
285 'action_name': 'generate_win64_gas',
286 'variables': {
287 'infile': '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff/win64-gas.mac',
288 'varname': 'win64_gas_stdmac',
289 'outfile': '<(generated_dir)/win64-gas.c',
290 },
291 'inputs': [ '<(PRODUCT_DIR)/'
292 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)',
293 '<(infile)', ],
294 'outputs': [ '<(outfile)', ],
295 'action': ['<(PRODUCT_DIR)/genmacro',
296 '<(outfile)', '<(varname)', '<(infile)',
297 ],
298 # Not a direct source because this is #included by
299 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c
300 'process_outputs_as_sources': 0,
301 'message': 'yasm genmacro for <(infile)',
302 },
303 {
304 'action_name': 'generate_win64_nasm',
305 'variables': {
306 'infile': '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff/win64-nasm.mac',
307 'varname': 'win64_nasm_stdmac',
308 'outfile': '<(generated_dir)/win64-nasm.c',
309 },
310 'inputs': [ '<(PRODUCT_DIR)/'
311 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)',
312 '<(infile)', ],
313 'outputs': [ '<(outfile)', ],
314 'action': ['<(PRODUCT_DIR)/genmacro',
315 '<(outfile)',
316 '<(varname)',
317 '<(infile)',
318 ],
319 # Not a direct source because this is #included by
320 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c
321 'process_outputs_as_sources': 0,
322 'message': 'yasm genmacro for <(infile)',
323 },
324
325 ###
326 ### genstring call.
327 ###
328 {
329 'action_name': 'generate_license',
330 'variables': {
331 'infile': '../third_party/externals/yasm/source/patched-yasm/COPYING',
332 'varname': 'license_msg',
333 'outfile': '<(generated_dir)/license.c',
334 },
335 'inputs': [ '<(PRODUCT_DIR)/'
336 '<(EXECUTABLE_PREFIX)genstring<(EXECUTABLE_SUFFIX)',
337 '<(infile)', ],
338 'outputs': [ '<(outfile)', ],
339 'action': ['<(PRODUCT_DIR)/genstring',
340 '<(varname)',
341 '<(outfile)',
342 '<(infile)',
343 ],
344 # Not a direct source because this is #included by
345 # source/patched-yasm/frontends/yasm/yasm.c
346 'process_outputs_as_sources': 0,
347 'message': 'Generating yasm embeddable license',
348 },
349
350 ###
351 ### A re2c call that doesn't fit into the rule below.
352 ###
353 {
354 'action_name': 'generate_lc3b_token',
355 'variables': {
356 'infile': '../third_party/externals/yasm/source/patched-yasm/modules/arch/lc3b/lc3bid.re',
357 # The license file is #included by yasm.c.
358 'outfile': '<(generated_dir)/lc3bid.c',
359 },
360 'inputs': [ '<(PRODUCT_DIR)/'
361 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)',
362 '<(infile)', ],
363 'outputs': [ '<(outfile)', ],
364 'action': [
365 '<(PRODUCT_DIR)/re2c',
366 '-s',
367 '-o', '<(outfile)',
368 '<(infile)'
369 ],
370 'process_outputs_as_sources': 1,
371 'message': 'Generating yasm tokens for lc3b',
372 },
373
374 ###
375 ### genmodule call.
376 ###
377 {
378 'action_name': 'generate_module',
379 'variables': {
380 'makefile': '../third_party/yasm/config/<(skia_os)/Makefile',
381 'module_in': '../third_party/externals/yasm/source/patched-yasm/libyasm/module.in',
382 'outfile': '<(generated_dir)/module.c',
383 },
384 'inputs': [
385 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)genmodule<(EXECUTABLE_SUFFIX)',
386 '<(module_in)',
387 '<(makefile)'
388 ],
389 'outputs': [ '<(generated_dir)/module.c' ],
390 'action': [
391 '<(PRODUCT_DIR)/genmodule',
392 '<(module_in)',
393 '<(makefile)',
394 '<(outfile)'
395 ],
396 'process_outputs_as_sources': 1,
397 'message': 'Generating yasm module information',
398 },
399 ],
400 },
401 {
402 'target_name': 'config_sources',
403 'type': 'none',
404 'toolsets': ['host'],
405 'sources': [
406 '../third_party/yasm/config/<(skia_os)/Makefile',
407 '../third_party/yasm/config/<(skia_os)/config.h',
408 '../third_party/yasm/config/<(skia_os)/libyasm-stdint.h',
409 ],
410 },
411 {
412 'target_name': 'generate_files',
413 'type': 'none',
414 'toolsets': ['host'],
415 'dependencies': [
416 'genperf',
417 'genversion',
418 ],
419 'sources': [
420 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86cpu.gperf',
421 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86regtmod.gperf',
422 ],
423 'rules': [
424 {
425 'rule_name': 'generate_gperf',
426 'extension': 'gperf',
427 'inputs': [ '<(PRODUCT_DIR)/'
428 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ],
429 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ],
430 'action': [
431 '<(PRODUCT_DIR)/genperf',
432 '<(RULE_INPUT_PATH)',
433 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c',
434 ],
435 'process_outputs_as_sources': 0,
436 'message': 'yasm genperf for <(RULE_INPUT_PATH)',
437 },
438 ],
439 'actions': [
440 {
441 'action_name': 'generate_x86_insn',
442 'variables': {
443 'gen_insn_path':
444 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/gen_x86_insn.py',
445 },
446 'inputs': [ '<(gen_insn_path)', ],
447 'outputs': [
448 '<(shared_generated_dir)/x86insns.c',
449 '<(shared_generated_dir)/x86insn_gas.gperf',
450 '<(shared_generated_dir)/x86insn_nasm.gperf',
451 ],
452 'action': [
453 'python',
454 '<(gen_insn_path)',
455 '<(shared_generated_dir)',
456 ],
457 'message': 'Running <(gen_insn_path)',
458 'process_outputs_as_sources': 0,
459 },
460 {
461 'action_name': 'generate_version',
462 'inputs': [ '<(PRODUCT_DIR)/'
463 '<(EXECUTABLE_PREFIX)genversion<(EXECUTABLE_SUFFIX)' ],
464 'outputs': [ '<(shared_generated_dir)/<(version_file)', ],
465 'action': [
466 '<(PRODUCT_DIR)/genversion',
467 '<(shared_generated_dir)/<(version_file)'
468 ],
469 'message': 'Generating yasm version file: '
470 '<(shared_generated_dir)/<(version_file)',
471 'process_outputs_as_sources': 0,
472 },
473 ],
474 },
475 {
476 'target_name': 'genperf_libs',
477 'type': 'static_library',
478 'toolsets': ['host'],
479 'dependencies': [ 'config_sources', ],
480 'sources': [
481 '../third_party/externals/yasm/source/patched-yasm/libyasm/phash.c',
482 '../third_party/externals/yasm/source/patched-yasm/libyasm/xmalloc.c',
483 '../third_party/externals/yasm/source/patched-yasm/libyasm/xstrdup.c',
484 ],
485 'include_dirs': [
486 '<@(yasm_include_dirs)',
487 ],
488 'defines': [ '<@(yasm_defines)' ],
489 'cflags': [
490 '<@(yasm_cflags)',
491 ],
492 'cflags!': [
493 '-mfpu=neon',
494 '-mthumb',
495 '-march=armv7-a',
496 ],
497 },
498 {
499 'target_name': 'genstring',
500 'type': 'executable',
501 'toolsets': ['host'],
502 'dependencies': [ 'config_sources', ],
503 'sources': [
504 '../third_party/externals/yasm/source/patched-yasm/genstring.c',
505 ],
506 'include_dirs': [
507 '<@(yasm_include_dirs)',
508 ],
509 'cflags': [
510 '-std=gnu99',
511 '-w',
512 ],
513 'cflags!': [
514 '-mfpu=neon',
515 '-mthumb',
516 '-march=armv7-a',
517 ],
518 },
519 {
520 'target_name': 'genperf',
521 'type': 'executable',
522 'toolsets': ['host'],
523 'dependencies': [
524 'genperf_libs',
525 ],
526 'sources': [
527 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/genperf.c',
528 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/perfect.c',
529 ],
530 'include_dirs': [
531 '<@(yasm_include_dirs)',
532 ],
533 'cflags': [
534 '-std=gnu99',
535 '-w',
536 ],
537 'cflags!': [
538 '-mfpu=neon',
539 '-mthumb',
540 '-march=armv7-a',
541 ],
542 },
543 {
544 'target_name': 'genmacro',
545 'type': 'executable',
546 'toolsets': ['host'],
547 'dependencies': [ 'config_sources', ],
548 'sources': [
549 '../third_party/externals/yasm/source/patched-yasm/tools/genmacro/genmacro.c',
550 ],
551 'include_dirs': [
552 '<@(yasm_include_dirs)',
553 ],
554 'cflags': [
555 '-std=gnu99',
556 '-w',
557 ],
558 'cflags!': [
559 '-mfpu=neon',
560 '-mthumb',
561 '-march=armv7-a',
562 ],
563 },
564 {
565 'target_name': 'genversion',
566 'type': 'executable',
567 'toolsets': ['host'],
568 'dependencies': [ 'config_sources', ],
569 'sources': [
570 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nasm/genversion.c',
571 ],
572 'include_dirs': [
573 '<@(yasm_include_dirs)',
574 ],
575 'cflags': [
576 '-std=gnu99',
577 '-w',
578 ],
579 'cflags!': [
580 '-mfpu=neon',
581 '-mthumb',
582 '-march=armv7-a',
583 ],
584 },
585 {
586 'target_name': 're2c',
587 'type': 'executable',
588 'toolsets': ['host'],
589 'dependencies': [ 'config_sources', ],
590 'sources': [
591 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/main.c',
592 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/code.c',
593 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/dfa.c',
594 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/parser.c',
595 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/actions.c',
596 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/scanner.c',
597 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/mbo_getopt.c',
598 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/substr.c',
599 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/translate.c',
600 ],
601 'include_dirs': [
602 '<@(yasm_include_dirs)',
603 ],
604 'cflags': [
605 '-std=gnu99',
606 '-w',
607 ],
608 'cflags!': [
609 '-mfpu=neon',
610 '-mthumb',
611 '-march=armv7-a',
612 ],
613 'xcode_settings': {
614 'WARNING_CFLAGS': [
615 '-w',
616 ],
617 },
618 'variables': {
619 # re2c is missing CLOSEVOP from one switch.
620 'clang_warning_flags': [ '-Wno-switch' ],
621 },
622 'msvs_disabled_warnings': [ 4267 ],
623 },
624 {
625 'target_name': 'genmodule',
626 'type': 'executable',
627 'toolsets': ['host'],
628 'dependencies': [
629 'config_sources',
630 ],
631 'sources': [
632 '../third_party/externals/yasm/source/patched-yasm/libyasm/genmodule.c',
633 ],
634 'include_dirs': [
635 '<@(yasm_include_dirs)',
636
637 ],
638 'cflags': [
639 '-std=gnu99',
640 ],
641 'cflags!': [
642 '-mfpu=neon',
643 '-mthumb',
644 '-march=armv7-a',
645 ],
646 },
647 ],
648}