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