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 '../third_party/yasm/config/<(skia_os)', |
| 36 '../third_party/externals/yasm/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=gnu99', |
| 47 '-ansi', |
| 48 '-pedantic', |
| 49 '-w', |
| 50 ], |
| 51 |
| 52 # Locations for various generated artifacts. |
| 53 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/yasm', |
| 54 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm', |
| 55 |
| 56 # Various files referenced by multiple targets. |
| 57 'version_file': 'version.mac', # Generated by genversion. |
| 58 'genmodule_source': 'genmodule_outfile.c', |
| 59 }, |
| 60 'target_defaults': { |
| 61 # Silence warnings in libc++ builds (C code doesn't need this flag). |
| 62 'ldflags!': [ '-stdlib=libc++', ], |
| 63 # https://crbug.com/489901 |
| 64 'cflags!': [ '-fsanitize=bounds' ], |
| 65 }, |
| 66 'targets': [ |
| 67 { |
| 68 'target_name': 'yasm', |
| 69 'type': 'executable', |
| 70 'toolsets': ['host'], |
| 71 'dependencies': [ |
| 72 'config_sources', |
| 73 'genmacro', |
| 74 'genmodule', |
| 75 'genperf', |
| 76 'genperf_libs', |
| 77 'generate_files', # Needed to generate gperf and instruction files. |
| 78 'genstring', |
| 79 're2c', |
| 80 ], |
| 81 'variables': { |
| 82 'clang_warning_flags': [ |
| 83 # yasm passes a `const elf_machine_sym*` through `void*`. |
| 84 '-Wno-incompatible-pointer-types', |
| 85 ], |
| 86 }, |
| 87 'conditions': [ |
| 88 ['skia_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' ] |
| 98 }, |
| 99 }, |
| 100 }], |
| 101 ], |
| 102 'sources': [ |
| 103 '../third_party/externals/yasm/source/patched-yasm/frontends/yasm/yasm-
options.c', |
| 104 '../third_party/externals/yasm/source/patched-yasm/frontends/yasm/yasm.
c', |
| 105 '../third_party/externals/yasm/source/patched-yasm/libyasm/assocdat.c', |
| 106 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-align.c', |
| 107 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-data.c', |
| 108 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-incbin.c'
, |
| 109 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-org.c', |
| 110 '../third_party/externals/yasm/source/patched-yasm/libyasm/bc-reserve.c
', |
| 111 '../third_party/externals/yasm/source/patched-yasm/libyasm/bitvect.c', |
| 112 '../third_party/externals/yasm/source/patched-yasm/libyasm/bytecode.c', |
| 113 '../third_party/externals/yasm/source/patched-yasm/libyasm/errwarn.c', |
| 114 '../third_party/externals/yasm/source/patched-yasm/libyasm/expr.c', |
| 115 '../third_party/externals/yasm/source/patched-yasm/libyasm/file.c', |
| 116 '../third_party/externals/yasm/source/patched-yasm/libyasm/floatnum.c', |
| 117 '../third_party/externals/yasm/source/patched-yasm/libyasm/hamt.c', |
| 118 '../third_party/externals/yasm/source/patched-yasm/libyasm/insn.c', |
| 119 '../third_party/externals/yasm/source/patched-yasm/libyasm/intnum.c', |
| 120 '../third_party/externals/yasm/source/patched-yasm/libyasm/inttree.c', |
| 121 '../third_party/externals/yasm/source/patched-yasm/libyasm/linemap.c', |
| 122 '../third_party/externals/yasm/source/patched-yasm/libyasm/md5.c', |
| 123 '../third_party/externals/yasm/source/patched-yasm/libyasm/mergesort.c'
, |
| 124 '../third_party/externals/yasm/source/patched-yasm/libyasm/section.c', |
| 125 '../third_party/externals/yasm/source/patched-yasm/libyasm/strcasecmp.c
', |
| 126 '../third_party/externals/yasm/source/patched-yasm/libyasm/strsep.c', |
| 127 '../third_party/externals/yasm/source/patched-yasm/libyasm/symrec.c', |
| 128 '../third_party/externals/yasm/source/patched-yasm/libyasm/valparam.c', |
| 129 '../third_party/externals/yasm/source/patched-yasm/libyasm/value.c', |
| 130 '../third_party/externals/yasm/source/patched-yasm/modules/arch/lc3b/lc
3barch.c', |
| 131 '../third_party/externals/yasm/source/patched-yasm/modules/arch/lc3b/lc
3bbc.c', |
| 132 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
arch.c', |
| 133 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
bc.c', |
| 134 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
expr.c', |
| 135 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
id.c', |
| 136 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/code
view/cv-dbgfmt.c', |
| 137 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/code
view/cv-symline.c', |
| 138 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/code
view/cv-type.c', |
| 139 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwar
f2/dwarf2-aranges.c', |
| 140 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwar
f2/dwarf2-dbgfmt.c', |
| 141 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwar
f2/dwarf2-info.c', |
| 142 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/dwar
f2/dwarf2-line.c', |
| 143 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/null
/null-dbgfmt.c', |
| 144 '../third_party/externals/yasm/source/patched-yasm/modules/dbgfmts/stab
s/stabs-dbgfmt.c', |
| 145 '../third_party/externals/yasm/source/patched-yasm/modules/listfmts/nas
m/nasm-listfmt.c', |
| 146 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/bin/
bin-objfmt.c', |
| 147 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff
/coff-objfmt.c', |
| 148 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/coff
/win64-except.c', |
| 149 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/dbg/
dbg-objfmt.c', |
| 150 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/
elf-objfmt.c', |
| 151 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/
elf-x86-amd64.c', |
| 152 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/
elf-x86-x86.c', |
| 153 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/elf/
elf.c', |
| 154 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/mach
o/macho-objfmt.c', |
| 155 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/rdf/
rdf-objfmt.c', |
| 156 '../third_party/externals/yasm/source/patched-yasm/modules/objfmts/xdf/
xdf-objfmt.c', |
| 157 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/
gas-parse.c', |
| 158 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/
gas-parse-intel.c', |
| 159 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/
gas-parser.c', |
| 160 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm
/nasm-parse.c', |
| 161 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/nasm
/nasm-parser.c', |
| 162 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/cpp
/cpp-preproc.c', |
| 163 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/nasm-eval.c', |
| 164 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/nasm-pp.c', |
| 165 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/nasm-preproc.c', |
| 166 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/nasmlib.c', |
| 167 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/raw
/raw-preproc.c', |
| 168 |
| 169 # Sources needed by re2c. |
| 170 '../third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/
gas-token.re', |
| 171 '../third_party/externals/yasm/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 'xcode_settings': { |
| 190 'WARNING_CFLAGS': [ |
| 191 '-w', |
| 192 ], |
| 193 }, |
| 194 'msvs_disabled_warnings': [ 4267 ], |
| 195 'rules': [ |
| 196 { |
| 197 'rule_name': 'generate_gperf', |
| 198 'extension': 'gperf', |
| 199 'inputs': [ '<(PRODUCT_DIR)/' |
| 200 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], |
| 201 'outputs': [ |
| 202 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 203 ], |
| 204 'action': ['<(PRODUCT_DIR)/genperf', |
| 205 '<(RULE_INPUT_PATH)', |
| 206 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 207 ], |
| 208 # These files are #included, so do not treat them as sources. |
| 209 'process_outputs_as_sources': 0, |
| 210 'message': 'yasm gperf for <(RULE_INPUT_PATH)', |
| 211 }, |
| 212 { |
| 213 'rule_name': 'generate_re2c', |
| 214 'extension': 're', |
| 215 'inputs': [ '<(PRODUCT_DIR)/' |
| 216 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)' ], |
| 217 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ], |
| 218 'action': [ |
| 219 '<(PRODUCT_DIR)/re2c', |
| 220 '-b', |
| 221 '-o', |
| 222 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 223 '<(RULE_INPUT_PATH)', |
| 224 ], |
| 225 'process_outputs_as_sources': 1, |
| 226 'message': 'yasm re2c for <(RULE_INPUT_PATH)', |
| 227 }, |
| 228 ], |
| 229 'actions': [ |
| 230 ### |
| 231 ### genmacro calls. |
| 232 ### |
| 233 { |
| 234 'action_name': 'generate_nasm_macros', |
| 235 'variables': { |
| 236 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/parsers/nasm/nasm-std.mac', |
| 237 'varname': 'nasm_standard_mac', |
| 238 'outfile': '<(generated_dir)/nasm-macros.c', |
| 239 }, |
| 240 'inputs': [ '<(PRODUCT_DIR)/' |
| 241 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 242 '<(infile)', ], |
| 243 'outputs': [ '<(outfile)', ], |
| 244 'action': ['<(PRODUCT_DIR)/genmacro', |
| 245 '<(outfile)', '<(varname)', '<(infile)', ], |
| 246 # Not a direct source because this is #included by |
| 247 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c |
| 248 'process_outputs_as_sources': 1, |
| 249 'xcode_settings': { |
| 250 'WARNING_CFLAGS': [ |
| 251 '-w', |
| 252 ], |
| 253 }, |
| 254 'message': 'yasm genmacro for <(infile)', |
| 255 }, |
| 256 { |
| 257 'action_name': 'generate_nasm_version', |
| 258 'variables': { |
| 259 'infile': '<(shared_generated_dir)/<(version_file)', |
| 260 'varname': 'nasm_version_mac', |
| 261 'outfile': '<(generated_dir)/nasm-version.c', |
| 262 }, |
| 263 'inputs': [ '<(PRODUCT_DIR)/' |
| 264 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 265 '<(infile)', ], |
| 266 'outputs': [ '<(outfile)', ], |
| 267 'action': ['<(PRODUCT_DIR)/genmacro', |
| 268 '<(outfile)', '<(varname)', '<(infile)', |
| 269 ], |
| 270 # Not a direct source because this is #included by |
| 271 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c |
| 272 'process_outputs_as_sources': 0, |
| 273 'message': 'yasm genmacro for <(infile)', |
| 274 }, |
| 275 { |
| 276 'action_name': 'generate_win64_gas', |
| 277 'variables': { |
| 278 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/objfmts/coff/win64-gas.mac', |
| 279 'varname': 'win64_gas_stdmac', |
| 280 'outfile': '<(generated_dir)/win64-gas.c', |
| 281 }, |
| 282 'inputs': [ '<(PRODUCT_DIR)/' |
| 283 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 284 '<(infile)', ], |
| 285 'outputs': [ '<(outfile)', ], |
| 286 'action': ['<(PRODUCT_DIR)/genmacro', |
| 287 '<(outfile)', '<(varname)', '<(infile)', |
| 288 ], |
| 289 # Not a direct source because this is #included by |
| 290 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c |
| 291 'process_outputs_as_sources': 0, |
| 292 'message': 'yasm genmacro for <(infile)', |
| 293 }, |
| 294 { |
| 295 'action_name': 'generate_win64_nasm', |
| 296 'variables': { |
| 297 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/objfmts/coff/win64-nasm.mac', |
| 298 'varname': 'win64_nasm_stdmac', |
| 299 'outfile': '<(generated_dir)/win64-nasm.c', |
| 300 }, |
| 301 'inputs': [ '<(PRODUCT_DIR)/' |
| 302 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 303 '<(infile)', ], |
| 304 'outputs': [ '<(outfile)', ], |
| 305 'action': ['<(PRODUCT_DIR)/genmacro', |
| 306 '<(outfile)', |
| 307 '<(varname)', |
| 308 '<(infile)', |
| 309 ], |
| 310 # Not a direct source because this is #included by |
| 311 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c |
| 312 'process_outputs_as_sources': 0, |
| 313 'message': 'yasm genmacro for <(infile)', |
| 314 }, |
| 315 |
| 316 ### |
| 317 ### genstring call. |
| 318 ### |
| 319 { |
| 320 'action_name': 'generate_license', |
| 321 'variables': { |
| 322 'infile': '../third_party/externals/yasm/source/patched-yasm/COPYING
', |
| 323 'varname': 'license_msg', |
| 324 'outfile': '<(generated_dir)/license.c', |
| 325 }, |
| 326 'inputs': [ '<(PRODUCT_DIR)/' |
| 327 '<(EXECUTABLE_PREFIX)genstring<(EXECUTABLE_SUFFIX)', |
| 328 '<(infile)', ], |
| 329 'outputs': [ '<(outfile)', ], |
| 330 'action': ['<(PRODUCT_DIR)/genstring', |
| 331 '<(varname)', |
| 332 '<(outfile)', |
| 333 '<(infile)', |
| 334 ], |
| 335 # Not a direct source because this is #included by |
| 336 # source/patched-yasm/frontends/yasm/yasm.c |
| 337 'process_outputs_as_sources': 0, |
| 338 'message': 'Generating yasm embeddable license', |
| 339 }, |
| 340 |
| 341 ### |
| 342 ### A re2c call that doesn't fit into the rule below. |
| 343 ### |
| 344 { |
| 345 'action_name': 'generate_lc3b_token', |
| 346 'variables': { |
| 347 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/arch/lc3b/lc3bid.re', |
| 348 # The license file is #included by yasm.c. |
| 349 'outfile': '<(generated_dir)/lc3bid.c', |
| 350 }, |
| 351 'inputs': [ '<(PRODUCT_DIR)/' |
| 352 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)', |
| 353 '<(infile)', ], |
| 354 'outputs': [ '<(outfile)', ], |
| 355 'action': [ |
| 356 '<(PRODUCT_DIR)/re2c', |
| 357 '-s', |
| 358 '-o', '<(outfile)', |
| 359 '<(infile)' |
| 360 ], |
| 361 'process_outputs_as_sources': 1, |
| 362 'message': 'Generating yasm tokens for lc3b', |
| 363 }, |
| 364 |
| 365 ### |
| 366 ### genmodule call. |
| 367 ### |
| 368 { |
| 369 'action_name': 'generate_module', |
| 370 'variables': { |
| 371 'makefile': '../third_party/yasm/config/<(skia_os)/Makefile', |
| 372 'module_in': '../third_party/externals/yasm/source/patched-yasm/liby
asm/module.in', |
| 373 'outfile': '<(generated_dir)/module.c', |
| 374 }, |
| 375 'inputs': [ |
| 376 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)genmodule<(EXECUTABLE_SUFFIX)', |
| 377 '<(module_in)', |
| 378 '<(makefile)' |
| 379 ], |
| 380 'outputs': [ '<(generated_dir)/module.c' ], |
| 381 'action': [ |
| 382 '<(PRODUCT_DIR)/genmodule', |
| 383 '<(module_in)', |
| 384 '<(makefile)', |
| 385 '<(outfile)' |
| 386 ], |
| 387 'process_outputs_as_sources': 1, |
| 388 'message': 'Generating yasm module information', |
| 389 }, |
| 390 ], |
| 391 }, |
| 392 { |
| 393 'target_name': 'config_sources', |
| 394 'type': 'none', |
| 395 'toolsets': ['host'], |
| 396 'sources': [ |
| 397 '../third_party/yasm/config/<(skia_os)/Makefile', |
| 398 '../third_party/yasm/config/<(skia_os)/config.h', |
| 399 '../third_party/yasm/config/<(skia_os)/libyasm-stdint.h', |
| 400 ], |
| 401 }, |
| 402 { |
| 403 'target_name': 'generate_files', |
| 404 'type': 'none', |
| 405 'toolsets': ['host'], |
| 406 'dependencies': [ |
| 407 'genperf', |
| 408 'genversion', |
| 409 ], |
| 410 'sources': [ |
| 411 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
cpu.gperf', |
| 412 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
regtmod.gperf', |
| 413 ], |
| 414 'rules': [ |
| 415 { |
| 416 'rule_name': 'generate_gperf', |
| 417 'extension': 'gperf', |
| 418 'inputs': [ '<(PRODUCT_DIR)/' |
| 419 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], |
| 420 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], |
| 421 'action': [ |
| 422 '<(PRODUCT_DIR)/genperf', |
| 423 '<(RULE_INPUT_PATH)', |
| 424 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', |
| 425 ], |
| 426 'process_outputs_as_sources': 0, |
| 427 'message': 'yasm genperf for <(RULE_INPUT_PATH)', |
| 428 }, |
| 429 ], |
| 430 'actions': [ |
| 431 { |
| 432 'action_name': 'generate_x86_insn', |
| 433 'variables': { |
| 434 'gen_insn_path': |
| 435 '../third_party/externals/yasm/source/patched-yasm/modules/arch/
x86/gen_x86_insn.py', |
| 436 }, |
| 437 'inputs': [ '<(gen_insn_path)', ], |
| 438 'outputs': [ |
| 439 '<(shared_generated_dir)/x86insns.c', |
| 440 '<(shared_generated_dir)/x86insn_gas.gperf', |
| 441 '<(shared_generated_dir)/x86insn_nasm.gperf', |
| 442 ], |
| 443 'action': [ |
| 444 'python', |
| 445 '<(gen_insn_path)', |
| 446 '<(shared_generated_dir)', |
| 447 ], |
| 448 'message': 'Running <(gen_insn_path)', |
| 449 'process_outputs_as_sources': 0, |
| 450 }, |
| 451 { |
| 452 'action_name': 'generate_version', |
| 453 'inputs': [ '<(PRODUCT_DIR)/' |
| 454 '<(EXECUTABLE_PREFIX)genversion<(EXECUTABLE_SUFFIX)' ], |
| 455 'outputs': [ '<(shared_generated_dir)/<(version_file)', ], |
| 456 'action': [ |
| 457 '<(PRODUCT_DIR)/genversion', |
| 458 '<(shared_generated_dir)/<(version_file)' |
| 459 ], |
| 460 'message': 'Generating yasm version file: ' |
| 461 '<(shared_generated_dir)/<(version_file)', |
| 462 'process_outputs_as_sources': 0, |
| 463 }, |
| 464 ], |
| 465 }, |
| 466 { |
| 467 'target_name': 'genperf_libs', |
| 468 'type': 'static_library', |
| 469 'toolsets': ['host'], |
| 470 'dependencies': [ 'config_sources', ], |
| 471 'sources': [ |
| 472 '../third_party/externals/yasm/source/patched-yasm/libyasm/phash.c', |
| 473 '../third_party/externals/yasm/source/patched-yasm/libyasm/xmalloc.c', |
| 474 '../third_party/externals/yasm/source/patched-yasm/libyasm/xstrdup.c', |
| 475 ], |
| 476 'include_dirs': [ |
| 477 '<@(yasm_include_dirs)', |
| 478 ], |
| 479 'defines': [ '<@(yasm_defines)' ], |
| 480 'cflags': [ |
| 481 '<@(yasm_cflags)', |
| 482 ], |
| 483 }, |
| 484 { |
| 485 'target_name': 'genstring', |
| 486 'type': 'executable', |
| 487 'toolsets': ['host'], |
| 488 'dependencies': [ 'config_sources', ], |
| 489 'sources': [ |
| 490 '../third_party/externals/yasm/source/patched-yasm/genstring.c', |
| 491 ], |
| 492 'include_dirs': [ |
| 493 '<@(yasm_include_dirs)', |
| 494 ], |
| 495 'cflags': [ |
| 496 '-std=gnu99', |
| 497 '-w', |
| 498 ], |
| 499 }, |
| 500 { |
| 501 'target_name': 'genperf', |
| 502 'type': 'executable', |
| 503 'toolsets': ['host'], |
| 504 'dependencies': [ |
| 505 'genperf_libs', |
| 506 ], |
| 507 'sources': [ |
| 508 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/genper
f.c', |
| 509 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/perfec
t.c', |
| 510 ], |
| 511 'include_dirs': [ |
| 512 '<@(yasm_include_dirs)', |
| 513 ], |
| 514 'cflags': [ |
| 515 '-std=gnu99', |
| 516 '-w', |
| 517 ], |
| 518 }, |
| 519 { |
| 520 'target_name': 'genmacro', |
| 521 'type': 'executable', |
| 522 'toolsets': ['host'], |
| 523 'dependencies': [ 'config_sources', ], |
| 524 'sources': [ |
| 525 '../third_party/externals/yasm/source/patched-yasm/tools/genmacro/genmac
ro.c', |
| 526 ], |
| 527 'include_dirs': [ |
| 528 '<@(yasm_include_dirs)', |
| 529 ], |
| 530 'cflags': [ |
| 531 '-std=gnu99', |
| 532 '-w', |
| 533 ], |
| 534 }, |
| 535 { |
| 536 'target_name': 'genversion', |
| 537 'type': 'executable', |
| 538 'toolsets': ['host'], |
| 539 'dependencies': [ 'config_sources', ], |
| 540 'sources': [ |
| 541 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/genversion.c', |
| 542 ], |
| 543 'include_dirs': [ |
| 544 '<@(yasm_include_dirs)', |
| 545 ], |
| 546 'cflags': [ |
| 547 '-std=gnu99', |
| 548 '-w', |
| 549 ], |
| 550 }, |
| 551 { |
| 552 'target_name': 're2c', |
| 553 'type': 'executable', |
| 554 'toolsets': ['host'], |
| 555 'dependencies': [ 'config_sources', ], |
| 556 'sources': [ |
| 557 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/main.c', |
| 558 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/code.c', |
| 559 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/dfa.c', |
| 560 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/parser.c'
, |
| 561 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/actions.c
', |
| 562 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/scanner.c
', |
| 563 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/mbo_getop
t.c', |
| 564 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/substr.c'
, |
| 565 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/translate
.c', |
| 566 ], |
| 567 'include_dirs': [ |
| 568 '<@(yasm_include_dirs)', |
| 569 ], |
| 570 'cflags': [ |
| 571 '-std=gnu99', |
| 572 '-w', |
| 573 ], |
| 574 'xcode_settings': { |
| 575 'WARNING_CFLAGS': [ |
| 576 '-w', |
| 577 ], |
| 578 }, |
| 579 'variables': { |
| 580 # re2c is missing CLOSEVOP from one switch. |
| 581 'clang_warning_flags': [ '-Wno-switch' ], |
| 582 }, |
| 583 'msvs_disabled_warnings': [ 4267 ], |
| 584 }, |
| 585 { |
| 586 'target_name': 'genmodule', |
| 587 'type': 'executable', |
| 588 'toolsets': ['host'], |
| 589 'dependencies': [ |
| 590 'config_sources', |
| 591 ], |
| 592 'sources': [ |
| 593 '../third_party/externals/yasm/source/patched-yasm/libyasm/genmodule.c', |
| 594 ], |
| 595 'include_dirs': [ |
| 596 '<@(yasm_include_dirs)', |
| 597 |
| 598 ], |
| 599 'cflags': [ |
| 600 '-std=gnu99', |
| 601 ], |
| 602 }, |
| 603 ], |
| 604 } |
OLD | NEW |