OLD | NEW |
| (Empty) |
1 # 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 'variables': { | |
34 'yasm_include_dirs': [ | |
35 'source/config/<(OS)', | |
36 'source/patched-yasm', | |
37 ], | |
38 | |
39 # The cflags used by any target that will be directly linked into yasm. | |
40 # These are specifically not used when building the subprograms. While | |
41 # it would probably be safe to use these flags there as well, the | |
42 # ./configure based build does not use the same flags between the main | |
43 # yasm executable, and its subprograms. | |
44 'yasm_defines': ['HAVE_CONFIG_H'], | |
45 'yasm_cflags': [ | |
46 '-std=c89', | |
47 '-pedantic', | |
48 ], | |
49 | |
50 # Locations for various generated artifacts. | |
51 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/yasm', | |
52 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm', | |
53 | |
54 # Various files referenced by multiple targets. | |
55 'version_file': 'version.mac', # Generated by genversion. | |
56 'genmodule_source': 'genmodule_outfile.c', | |
57 }, | |
58 'target_defaults': { | |
59 # Silence warnings in libc++ builds (C code doesn't need this flag). | |
60 'ldflags!': [ '-stdlib=libc++', ], | |
61 # https://crbug.com/489901 | |
62 'cflags!': [ '-fsanitize=bounds' ], | |
63 }, | |
64 'targets': [ | |
65 { | |
66 'target_name': 'yasm', | |
67 'type': 'executable', | |
68 'toolsets': ['host'], | |
69 'dependencies': [ | |
70 'config_sources', | |
71 'genmacro', | |
72 'genmodule', | |
73 'genperf', | |
74 'genperf_libs', | |
75 'generate_files', # Needed to generate gperf and instruction files. | |
76 'genstring', | |
77 're2c', | |
78 ], | |
79 'variables': { | |
80 'clang_warning_flags': [ | |
81 # yasm passes a `const elf_machine_sym*` through `void*`. | |
82 '-Wno-incompatible-pointer-types', | |
83 # reg3264type in x86expr.c is unused. | |
84 '-Wno-unused-local-typedef', | |
85 ], | |
86 }, | |
87 'conditions': [ | |
88 ['OS=="win"', { | |
89 # As of VS 2013 Update 3, building this project with /analyze hits an | |
90 # internal compiler error on elf-x86-amd64.c in release builds with | |
91 # the amd64_x86 compiler. This halts the build and prevents subsequent | |
92 # analysis. Therefore, /analyze is disabled for this project. See this | |
93 # bug for details: | |
94 # https://connect.microsoft.com/VisualStudio/feedback/details/1014799/
internal-compiler-error-when-using-analyze | |
95 'msvs_settings': { | |
96 'VCCLCompilerTool': { | |
97 'AdditionalOptions!': [ '/analyze:WX-' ] | |
98 }, | |
99 }, | |
100 }], | |
101 ], | |
102 'sources': [ | |
103 'source/patched-yasm/frontends/yasm/yasm-options.c', | |
104 'source/patched-yasm/frontends/yasm/yasm.c', | |
105 'source/patched-yasm/libyasm/assocdat.c', | |
106 'source/patched-yasm/libyasm/bc-align.c', | |
107 'source/patched-yasm/libyasm/bc-data.c', | |
108 'source/patched-yasm/libyasm/bc-incbin.c', | |
109 'source/patched-yasm/libyasm/bc-org.c', | |
110 'source/patched-yasm/libyasm/bc-reserve.c', | |
111 'source/patched-yasm/libyasm/bitvect.c', | |
112 'source/patched-yasm/libyasm/bytecode.c', | |
113 'source/patched-yasm/libyasm/errwarn.c', | |
114 'source/patched-yasm/libyasm/expr.c', | |
115 'source/patched-yasm/libyasm/file.c', | |
116 'source/patched-yasm/libyasm/floatnum.c', | |
117 'source/patched-yasm/libyasm/hamt.c', | |
118 'source/patched-yasm/libyasm/insn.c', | |
119 'source/patched-yasm/libyasm/intnum.c', | |
120 'source/patched-yasm/libyasm/inttree.c', | |
121 'source/patched-yasm/libyasm/linemap.c', | |
122 'source/patched-yasm/libyasm/md5.c', | |
123 'source/patched-yasm/libyasm/mergesort.c', | |
124 'source/patched-yasm/libyasm/section.c', | |
125 'source/patched-yasm/libyasm/strcasecmp.c', | |
126 'source/patched-yasm/libyasm/strsep.c', | |
127 'source/patched-yasm/libyasm/symrec.c', | |
128 'source/patched-yasm/libyasm/valparam.c', | |
129 'source/patched-yasm/libyasm/value.c', | |
130 'source/patched-yasm/modules/arch/lc3b/lc3barch.c', | |
131 'source/patched-yasm/modules/arch/lc3b/lc3bbc.c', | |
132 'source/patched-yasm/modules/arch/x86/x86arch.c', | |
133 'source/patched-yasm/modules/arch/x86/x86bc.c', | |
134 'source/patched-yasm/modules/arch/x86/x86expr.c', | |
135 'source/patched-yasm/modules/arch/x86/x86id.c', | |
136 'source/patched-yasm/modules/dbgfmts/codeview/cv-dbgfmt.c', | |
137 'source/patched-yasm/modules/dbgfmts/codeview/cv-symline.c', | |
138 'source/patched-yasm/modules/dbgfmts/codeview/cv-type.c', | |
139 'source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-aranges.c', | |
140 'source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c', | |
141 'source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-info.c', | |
142 'source/patched-yasm/modules/dbgfmts/dwarf2/dwarf2-line.c', | |
143 'source/patched-yasm/modules/dbgfmts/null/null-dbgfmt.c', | |
144 'source/patched-yasm/modules/dbgfmts/stabs/stabs-dbgfmt.c', | |
145 'source/patched-yasm/modules/listfmts/nasm/nasm-listfmt.c', | |
146 'source/patched-yasm/modules/objfmts/bin/bin-objfmt.c', | |
147 'source/patched-yasm/modules/objfmts/coff/coff-objfmt.c', | |
148 'source/patched-yasm/modules/objfmts/coff/win64-except.c', | |
149 'source/patched-yasm/modules/objfmts/dbg/dbg-objfmt.c', | |
150 'source/patched-yasm/modules/objfmts/elf/elf-objfmt.c', | |
151 'source/patched-yasm/modules/objfmts/elf/elf-x86-amd64.c', | |
152 'source/patched-yasm/modules/objfmts/elf/elf-x86-x86.c', | |
153 'source/patched-yasm/modules/objfmts/elf/elf.c', | |
154 'source/patched-yasm/modules/objfmts/macho/macho-objfmt.c', | |
155 'source/patched-yasm/modules/objfmts/rdf/rdf-objfmt.c', | |
156 'source/patched-yasm/modules/objfmts/xdf/xdf-objfmt.c', | |
157 'source/patched-yasm/modules/parsers/gas/gas-parse.c', | |
158 'source/patched-yasm/modules/parsers/gas/gas-parse-intel.c', | |
159 'source/patched-yasm/modules/parsers/gas/gas-parser.c', | |
160 'source/patched-yasm/modules/parsers/nasm/nasm-parse.c', | |
161 'source/patched-yasm/modules/parsers/nasm/nasm-parser.c', | |
162 'source/patched-yasm/modules/preprocs/cpp/cpp-preproc.c', | |
163 'source/patched-yasm/modules/preprocs/nasm/nasm-eval.c', | |
164 'source/patched-yasm/modules/preprocs/nasm/nasm-pp.c', | |
165 'source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c', | |
166 'source/patched-yasm/modules/preprocs/nasm/nasmlib.c', | |
167 'source/patched-yasm/modules/preprocs/raw/raw-preproc.c', | |
168 | |
169 # Sources needed by re2c. | |
170 'source/patched-yasm/modules/parsers/gas/gas-token.re', | |
171 'source/patched-yasm/modules/parsers/nasm/nasm-token.re', | |
172 | |
173 # Sources needed by genperf. Make sure the generated gperf files | |
174 # (the ones in shared_generated_dir) are synced with the outputs | |
175 # for the related generate_*_insn actions in the generate_files | |
176 # target below. | |
177 '<(shared_generated_dir)/x86insn_nasm.gperf', | |
178 '<(shared_generated_dir)/x86insn_gas.gperf', | |
179 '<(shared_generated_dir)/x86cpu.c', | |
180 '<(shared_generated_dir)/x86regtmod.c', | |
181 ], | |
182 'include_dirs': [ | |
183 '<@(yasm_include_dirs)', | |
184 '<(shared_generated_dir)', | |
185 '<(generated_dir)', | |
186 ], | |
187 'defines': [ '<@(yasm_defines)' ], | |
188 'cflags': [ '<@(yasm_cflags)', ], | |
189 'msvs_disabled_warnings': [ 4267 ], | |
190 'rules': [ | |
191 { | |
192 'rule_name': 'generate_gperf', | |
193 'extension': 'gperf', | |
194 'inputs': [ '<(PRODUCT_DIR)/' | |
195 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], | |
196 'outputs': [ | |
197 '<(generated_dir)/<(RULE_INPUT_ROOT).c', | |
198 ], | |
199 'action': ['<(PRODUCT_DIR)/genperf', | |
200 '<(RULE_INPUT_PATH)', | |
201 '<(generated_dir)/<(RULE_INPUT_ROOT).c', | |
202 ], | |
203 # These files are #included, so do not treat them as sources. | |
204 'process_outputs_as_sources': 0, | |
205 'message': 'yasm gperf for <(RULE_INPUT_PATH)', | |
206 }, | |
207 { | |
208 'rule_name': 'generate_re2c', | |
209 'extension': 're', | |
210 'inputs': [ '<(PRODUCT_DIR)/' | |
211 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)' ], | |
212 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ], | |
213 'action': [ | |
214 '<(PRODUCT_DIR)/re2c', | |
215 '-b', | |
216 '-o', | |
217 '<(generated_dir)/<(RULE_INPUT_ROOT).c', | |
218 '<(RULE_INPUT_PATH)', | |
219 ], | |
220 'process_outputs_as_sources': 1, | |
221 'message': 'yasm re2c for <(RULE_INPUT_PATH)', | |
222 }, | |
223 ], | |
224 'actions': [ | |
225 ### | |
226 ### genmacro calls. | |
227 ### | |
228 { | |
229 'action_name': 'generate_nasm_macros', | |
230 'variables': { | |
231 'infile': 'source/patched-yasm/modules/parsers/nasm/nasm-std.mac', | |
232 'varname': 'nasm_standard_mac', | |
233 'outfile': '<(generated_dir)/nasm-macros.c', | |
234 }, | |
235 'inputs': [ '<(PRODUCT_DIR)/' | |
236 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', | |
237 '<(infile)', ], | |
238 'outputs': [ '<(outfile)', ], | |
239 'action': ['<(PRODUCT_DIR)/genmacro', | |
240 '<(outfile)', '<(varname)', '<(infile)', ], | |
241 # Not a direct source because this is #included by | |
242 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c | |
243 'process_outputs_as_sources': 1, | |
244 'message': 'yasm genmacro for <(infile)', | |
245 }, | |
246 { | |
247 'action_name': 'generate_nasm_version', | |
248 'variables': { | |
249 'infile': '<(shared_generated_dir)/<(version_file)', | |
250 'varname': 'nasm_version_mac', | |
251 'outfile': '<(generated_dir)/nasm-version.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 ], | |
260 # Not a direct source because this is #included by | |
261 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c | |
262 'process_outputs_as_sources': 0, | |
263 'message': 'yasm genmacro for <(infile)', | |
264 }, | |
265 { | |
266 'action_name': 'generate_win64_gas', | |
267 'variables': { | |
268 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-gas.mac', | |
269 'varname': 'win64_gas_stdmac', | |
270 'outfile': '<(generated_dir)/win64-gas.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/objfmts/coff/coff-objfmt.c | |
281 'process_outputs_as_sources': 0, | |
282 'message': 'yasm genmacro for <(infile)', | |
283 }, | |
284 { | |
285 'action_name': 'generate_win64_nasm', | |
286 'variables': { | |
287 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-nasm.mac', | |
288 'varname': 'win64_nasm_stdmac', | |
289 'outfile': '<(generated_dir)/win64-nasm.c', | |
290 }, | |
291 'inputs': [ '<(PRODUCT_DIR)/' | |
292 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', | |
293 '<(infile)', ], | |
294 'outputs': [ '<(outfile)', ], | |
295 'action': ['<(PRODUCT_DIR)/genmacro', | |
296 '<(outfile)', | |
297 '<(varname)', | |
298 '<(infile)', | |
299 ], | |
300 # Not a direct source because this is #included by | |
301 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c | |
302 'process_outputs_as_sources': 0, | |
303 'message': 'yasm genmacro for <(infile)', | |
304 }, | |
305 | |
306 ### | |
307 ### genstring call. | |
308 ### | |
309 { | |
310 'action_name': 'generate_license', | |
311 'variables': { | |
312 'infile': 'source/patched-yasm/COPYING', | |
313 'varname': 'license_msg', | |
314 'outfile': '<(generated_dir)/license.c', | |
315 }, | |
316 'inputs': [ '<(PRODUCT_DIR)/' | |
317 '<(EXECUTABLE_PREFIX)genstring<(EXECUTABLE_SUFFIX)', | |
318 '<(infile)', ], | |
319 'outputs': [ '<(outfile)', ], | |
320 'action': ['<(PRODUCT_DIR)/genstring', | |
321 '<(varname)', | |
322 '<(outfile)', | |
323 '<(infile)', | |
324 ], | |
325 # Not a direct source because this is #included by | |
326 # source/patched-yasm/frontends/yasm/yasm.c | |
327 'process_outputs_as_sources': 0, | |
328 'message': 'Generating yasm embeddable license', | |
329 }, | |
330 | |
331 ### | |
332 ### A re2c call that doesn't fit into the rule below. | |
333 ### | |
334 { | |
335 'action_name': 'generate_lc3b_token', | |
336 'variables': { | |
337 'infile': 'source/patched-yasm/modules/arch/lc3b/lc3bid.re', | |
338 # The license file is #included by yasm.c. | |
339 'outfile': '<(generated_dir)/lc3bid.c', | |
340 }, | |
341 'inputs': [ '<(PRODUCT_DIR)/' | |
342 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)', | |
343 '<(infile)', ], | |
344 'outputs': [ '<(outfile)', ], | |
345 'action': [ | |
346 '<(PRODUCT_DIR)/re2c', | |
347 '-s', | |
348 '-o', '<(outfile)', | |
349 '<(infile)' | |
350 ], | |
351 'process_outputs_as_sources': 1, | |
352 'message': 'Generating yasm tokens for lc3b', | |
353 }, | |
354 | |
355 ### | |
356 ### genmodule call. | |
357 ### | |
358 { | |
359 'action_name': 'generate_module', | |
360 'variables': { | |
361 'makefile': 'source/config/<(OS)/Makefile', | |
362 'module_in': 'source/patched-yasm/libyasm/module.in', | |
363 'outfile': '<(generated_dir)/module.c', | |
364 }, | |
365 'inputs': [ | |
366 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)genmodule<(EXECUTABLE_SUFFIX)', | |
367 '<(module_in)', | |
368 '<(makefile)' | |
369 ], | |
370 'outputs': [ '<(generated_dir)/module.c' ], | |
371 'action': [ | |
372 '<(PRODUCT_DIR)/genmodule', | |
373 '<(module_in)', | |
374 '<(makefile)', | |
375 '<(outfile)' | |
376 ], | |
377 'process_outputs_as_sources': 1, | |
378 'message': 'Generating yasm module information', | |
379 }, | |
380 ], | |
381 }, | |
382 { | |
383 'target_name': 'config_sources', | |
384 'type': 'none', | |
385 'toolsets': ['host'], | |
386 'sources': [ | |
387 'source/config/<(OS)/Makefile', | |
388 'source/config/<(OS)/config.h', | |
389 'source/config/<(OS)/libyasm-stdint.h', | |
390 ], | |
391 }, | |
392 { | |
393 'target_name': 'generate_files', | |
394 'type': 'none', | |
395 'toolsets': ['host'], | |
396 'dependencies': [ | |
397 'genperf', | |
398 'genversion', | |
399 ], | |
400 'sources': [ | |
401 'source/patched-yasm/modules/arch/x86/x86cpu.gperf', | |
402 'source/patched-yasm/modules/arch/x86/x86regtmod.gperf', | |
403 ], | |
404 'rules': [ | |
405 { | |
406 'rule_name': 'generate_gperf', | |
407 'extension': 'gperf', | |
408 'inputs': [ '<(PRODUCT_DIR)/' | |
409 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], | |
410 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], | |
411 'action': [ | |
412 '<(PRODUCT_DIR)/genperf', | |
413 '<(RULE_INPUT_PATH)', | |
414 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', | |
415 ], | |
416 'process_outputs_as_sources': 0, | |
417 'message': 'yasm genperf for <(RULE_INPUT_PATH)', | |
418 }, | |
419 ], | |
420 'actions': [ | |
421 { | |
422 'action_name': 'generate_x86_insn', | |
423 'variables': { | |
424 'gen_insn_path': | |
425 'source/patched-yasm/modules/arch/x86/gen_x86_insn.py', | |
426 }, | |
427 'inputs': [ '<(gen_insn_path)', ], | |
428 'outputs': [ | |
429 '<(shared_generated_dir)/x86insns.c', | |
430 '<(shared_generated_dir)/x86insn_gas.gperf', | |
431 '<(shared_generated_dir)/x86insn_nasm.gperf', | |
432 ], | |
433 'action': [ | |
434 'python', | |
435 '<(gen_insn_path)', | |
436 '<(shared_generated_dir)', | |
437 ], | |
438 'message': 'Running <(gen_insn_path)', | |
439 'process_outputs_as_sources': 0, | |
440 }, | |
441 { | |
442 'action_name': 'generate_version', | |
443 'inputs': [ '<(PRODUCT_DIR)/' | |
444 '<(EXECUTABLE_PREFIX)genversion<(EXECUTABLE_SUFFIX)' ], | |
445 'outputs': [ '<(shared_generated_dir)/<(version_file)', ], | |
446 'action': [ | |
447 '<(PRODUCT_DIR)/genversion', | |
448 '<(shared_generated_dir)/<(version_file)' | |
449 ], | |
450 'message': 'Generating yasm version file: ' | |
451 '<(shared_generated_dir)/<(version_file)', | |
452 'process_outputs_as_sources': 0, | |
453 }, | |
454 ], | |
455 }, | |
456 { | |
457 'target_name': 'genperf_libs', | |
458 'type': 'static_library', | |
459 'toolsets': ['host'], | |
460 'dependencies': [ 'config_sources', ], | |
461 'sources': [ | |
462 'source/patched-yasm/libyasm/phash.c', | |
463 'source/patched-yasm/libyasm/xmalloc.c', | |
464 'source/patched-yasm/libyasm/xstrdup.c', | |
465 ], | |
466 'include_dirs': [ | |
467 '<@(yasm_include_dirs)', | |
468 ], | |
469 'defines': [ '<@(yasm_defines)' ], | |
470 'cflags': [ | |
471 '<@(yasm_cflags)', | |
472 ], | |
473 }, | |
474 { | |
475 'target_name': 'genstring', | |
476 'type': 'executable', | |
477 'toolsets': ['host'], | |
478 'dependencies': [ 'config_sources', ], | |
479 'sources': [ | |
480 'source/patched-yasm/genstring.c', | |
481 ], | |
482 'include_dirs': [ | |
483 '<@(yasm_include_dirs)', | |
484 ], | |
485 'cflags': [ | |
486 '-std=gnu99', | |
487 ], | |
488 }, | |
489 { | |
490 'target_name': 'genperf', | |
491 'type': 'executable', | |
492 'toolsets': ['host'], | |
493 'dependencies': [ | |
494 'genperf_libs', | |
495 ], | |
496 'sources': [ | |
497 'source/patched-yasm/tools/genperf/genperf.c', | |
498 'source/patched-yasm/tools/genperf/perfect.c', | |
499 ], | |
500 'include_dirs': [ | |
501 '<@(yasm_include_dirs)', | |
502 ], | |
503 'cflags': [ | |
504 '-std=gnu99', | |
505 ], | |
506 }, | |
507 { | |
508 'target_name': 'genmacro', | |
509 'type': 'executable', | |
510 'toolsets': ['host'], | |
511 'dependencies': [ 'config_sources', ], | |
512 'sources': [ | |
513 'source/patched-yasm/tools/genmacro/genmacro.c', | |
514 ], | |
515 'include_dirs': [ | |
516 '<@(yasm_include_dirs)', | |
517 ], | |
518 'cflags': [ | |
519 '-std=gnu99', | |
520 ], | |
521 }, | |
522 { | |
523 'target_name': 'genversion', | |
524 'type': 'executable', | |
525 'toolsets': ['host'], | |
526 'dependencies': [ 'config_sources', ], | |
527 'sources': [ | |
528 'source/patched-yasm/modules/preprocs/nasm/genversion.c', | |
529 ], | |
530 'include_dirs': [ | |
531 '<@(yasm_include_dirs)', | |
532 ], | |
533 'cflags': [ | |
534 '-std=gnu99', | |
535 ], | |
536 }, | |
537 { | |
538 'target_name': 're2c', | |
539 'type': 'executable', | |
540 'toolsets': ['host'], | |
541 'dependencies': [ 'config_sources', ], | |
542 'sources': [ | |
543 'source/patched-yasm/tools/re2c/main.c', | |
544 'source/patched-yasm/tools/re2c/code.c', | |
545 'source/patched-yasm/tools/re2c/dfa.c', | |
546 'source/patched-yasm/tools/re2c/parser.c', | |
547 'source/patched-yasm/tools/re2c/actions.c', | |
548 'source/patched-yasm/tools/re2c/scanner.c', | |
549 'source/patched-yasm/tools/re2c/mbo_getopt.c', | |
550 'source/patched-yasm/tools/re2c/substr.c', | |
551 'source/patched-yasm/tools/re2c/translate.c', | |
552 ], | |
553 'include_dirs': [ | |
554 '<@(yasm_include_dirs)', | |
555 ], | |
556 'cflags': [ | |
557 '-std=gnu99', | |
558 ], | |
559 'variables': { | |
560 'clang_warning_flags': [ | |
561 # re2c is missing CLOSEVOP from one switch. | |
562 '-Wno-switch', | |
563 # re2c contains many static functions in headers (because it's | |
564 # a C library predating C99.) | |
565 '-Wno-unused-function', | |
566 ], | |
567 }, | |
568 'msvs_disabled_warnings': [ 4267 ], | |
569 }, | |
570 { | |
571 'target_name': 'genmodule', | |
572 'type': 'executable', | |
573 'toolsets': ['host'], | |
574 'dependencies': [ | |
575 'config_sources', | |
576 ], | |
577 'sources': [ | |
578 'source/patched-yasm/libyasm/genmodule.c', | |
579 ], | |
580 'include_dirs': [ | |
581 '<@(yasm_include_dirs)', | |
582 | |
583 ], | |
584 'cflags': [ | |
585 '-std=gnu99', | |
586 ], | |
587 }, | |
588 ], | |
589 } | |
OLD | NEW |