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 'cflags!': [ |
| 190 '-mfpu=neon', |
| 191 '-mthumb', |
| 192 '-march=armv7-a', |
| 193 ], |
| 194 'xcode_settings': { |
| 195 'WARNING_CFLAGS': [ |
| 196 '-w', |
| 197 ], |
| 198 }, |
| 199 'msvs_disabled_warnings': [ 4267 ], |
| 200 'rules': [ |
| 201 { |
| 202 'rule_name': 'generate_gperf', |
| 203 'extension': 'gperf', |
| 204 'inputs': [ '<(PRODUCT_DIR)/' |
| 205 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], |
| 206 'outputs': [ |
| 207 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 208 ], |
| 209 'action': ['<(PRODUCT_DIR)/genperf', |
| 210 '<(RULE_INPUT_PATH)', |
| 211 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 212 ], |
| 213 # These files are #included, so do not treat them as sources. |
| 214 'process_outputs_as_sources': 0, |
| 215 'message': 'yasm gperf for <(RULE_INPUT_PATH)', |
| 216 }, |
| 217 { |
| 218 'rule_name': 'generate_re2c', |
| 219 'extension': 're', |
| 220 'inputs': [ '<(PRODUCT_DIR)/' |
| 221 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)' ], |
| 222 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ], |
| 223 'action': [ |
| 224 '<(PRODUCT_DIR)/re2c', |
| 225 '-b', |
| 226 '-o', |
| 227 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
| 228 '<(RULE_INPUT_PATH)', |
| 229 ], |
| 230 'process_outputs_as_sources': 1, |
| 231 'message': 'yasm re2c for <(RULE_INPUT_PATH)', |
| 232 }, |
| 233 ], |
| 234 'actions': [ |
| 235 ### |
| 236 ### genmacro calls. |
| 237 ### |
| 238 { |
| 239 'action_name': 'generate_nasm_macros', |
| 240 'variables': { |
| 241 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/parsers/nasm/nasm-std.mac', |
| 242 'varname': 'nasm_standard_mac', |
| 243 'outfile': '<(generated_dir)/nasm-macros.c', |
| 244 }, |
| 245 'inputs': [ '<(PRODUCT_DIR)/' |
| 246 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 247 '<(infile)', ], |
| 248 'outputs': [ '<(outfile)', ], |
| 249 'action': ['<(PRODUCT_DIR)/genmacro', |
| 250 '<(outfile)', '<(varname)', '<(infile)', ], |
| 251 # Not a direct source because this is #included by |
| 252 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c |
| 253 'process_outputs_as_sources': 1, |
| 254 'xcode_settings': { |
| 255 'WARNING_CFLAGS': [ |
| 256 '-w', |
| 257 ], |
| 258 }, |
| 259 'message': 'yasm genmacro for <(infile)', |
| 260 }, |
| 261 { |
| 262 'action_name': 'generate_nasm_version', |
| 263 'variables': { |
| 264 'infile': '<(shared_generated_dir)/<(version_file)', |
| 265 'varname': 'nasm_version_mac', |
| 266 'outfile': '<(generated_dir)/nasm-version.c', |
| 267 }, |
| 268 'inputs': [ '<(PRODUCT_DIR)/' |
| 269 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 270 '<(infile)', ], |
| 271 'outputs': [ '<(outfile)', ], |
| 272 'action': ['<(PRODUCT_DIR)/genmacro', |
| 273 '<(outfile)', '<(varname)', '<(infile)', |
| 274 ], |
| 275 # Not a direct source because this is #included by |
| 276 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c |
| 277 'process_outputs_as_sources': 0, |
| 278 'message': 'yasm genmacro for <(infile)', |
| 279 }, |
| 280 { |
| 281 'action_name': 'generate_win64_gas', |
| 282 'variables': { |
| 283 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/objfmts/coff/win64-gas.mac', |
| 284 'varname': 'win64_gas_stdmac', |
| 285 'outfile': '<(generated_dir)/win64-gas.c', |
| 286 }, |
| 287 'inputs': [ '<(PRODUCT_DIR)/' |
| 288 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 289 '<(infile)', ], |
| 290 'outputs': [ '<(outfile)', ], |
| 291 'action': ['<(PRODUCT_DIR)/genmacro', |
| 292 '<(outfile)', '<(varname)', '<(infile)', |
| 293 ], |
| 294 # Not a direct source because this is #included by |
| 295 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c |
| 296 'process_outputs_as_sources': 0, |
| 297 'message': 'yasm genmacro for <(infile)', |
| 298 }, |
| 299 { |
| 300 'action_name': 'generate_win64_nasm', |
| 301 'variables': { |
| 302 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/objfmts/coff/win64-nasm.mac', |
| 303 'varname': 'win64_nasm_stdmac', |
| 304 'outfile': '<(generated_dir)/win64-nasm.c', |
| 305 }, |
| 306 'inputs': [ '<(PRODUCT_DIR)/' |
| 307 '<(EXECUTABLE_PREFIX)genmacro<(EXECUTABLE_SUFFIX)', |
| 308 '<(infile)', ], |
| 309 'outputs': [ '<(outfile)', ], |
| 310 'action': ['<(PRODUCT_DIR)/genmacro', |
| 311 '<(outfile)', |
| 312 '<(varname)', |
| 313 '<(infile)', |
| 314 ], |
| 315 # Not a direct source because this is #included by |
| 316 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c |
| 317 'process_outputs_as_sources': 0, |
| 318 'message': 'yasm genmacro for <(infile)', |
| 319 }, |
| 320 |
| 321 ### |
| 322 ### genstring call. |
| 323 ### |
| 324 { |
| 325 'action_name': 'generate_license', |
| 326 'variables': { |
| 327 'infile': '../third_party/externals/yasm/source/patched-yasm/COPYING
', |
| 328 'varname': 'license_msg', |
| 329 'outfile': '<(generated_dir)/license.c', |
| 330 }, |
| 331 'inputs': [ '<(PRODUCT_DIR)/' |
| 332 '<(EXECUTABLE_PREFIX)genstring<(EXECUTABLE_SUFFIX)', |
| 333 '<(infile)', ], |
| 334 'outputs': [ '<(outfile)', ], |
| 335 'action': ['<(PRODUCT_DIR)/genstring', |
| 336 '<(varname)', |
| 337 '<(outfile)', |
| 338 '<(infile)', |
| 339 ], |
| 340 # Not a direct source because this is #included by |
| 341 # source/patched-yasm/frontends/yasm/yasm.c |
| 342 'process_outputs_as_sources': 0, |
| 343 'message': 'Generating yasm embeddable license', |
| 344 }, |
| 345 |
| 346 ### |
| 347 ### A re2c call that doesn't fit into the rule below. |
| 348 ### |
| 349 { |
| 350 'action_name': 'generate_lc3b_token', |
| 351 'variables': { |
| 352 'infile': '../third_party/externals/yasm/source/patched-yasm/modules
/arch/lc3b/lc3bid.re', |
| 353 # The license file is #included by yasm.c. |
| 354 'outfile': '<(generated_dir)/lc3bid.c', |
| 355 }, |
| 356 'inputs': [ '<(PRODUCT_DIR)/' |
| 357 '<(EXECUTABLE_PREFIX)re2c<(EXECUTABLE_SUFFIX)', |
| 358 '<(infile)', ], |
| 359 'outputs': [ '<(outfile)', ], |
| 360 'action': [ |
| 361 '<(PRODUCT_DIR)/re2c', |
| 362 '-s', |
| 363 '-o', '<(outfile)', |
| 364 '<(infile)' |
| 365 ], |
| 366 'process_outputs_as_sources': 1, |
| 367 'message': 'Generating yasm tokens for lc3b', |
| 368 }, |
| 369 |
| 370 ### |
| 371 ### genmodule call. |
| 372 ### |
| 373 { |
| 374 'action_name': 'generate_module', |
| 375 'variables': { |
| 376 'makefile': '../third_party/yasm/config/<(skia_os)/Makefile', |
| 377 'module_in': '../third_party/externals/yasm/source/patched-yasm/liby
asm/module.in', |
| 378 'outfile': '<(generated_dir)/module.c', |
| 379 }, |
| 380 'inputs': [ |
| 381 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)genmodule<(EXECUTABLE_SUFFIX)', |
| 382 '<(module_in)', |
| 383 '<(makefile)' |
| 384 ], |
| 385 'outputs': [ '<(generated_dir)/module.c' ], |
| 386 'action': [ |
| 387 '<(PRODUCT_DIR)/genmodule', |
| 388 '<(module_in)', |
| 389 '<(makefile)', |
| 390 '<(outfile)' |
| 391 ], |
| 392 'process_outputs_as_sources': 1, |
| 393 'message': 'Generating yasm module information', |
| 394 }, |
| 395 ], |
| 396 }, |
| 397 { |
| 398 'target_name': 'config_sources', |
| 399 'type': 'none', |
| 400 'toolsets': ['host'], |
| 401 'sources': [ |
| 402 '../third_party/yasm/config/<(skia_os)/Makefile', |
| 403 '../third_party/yasm/config/<(skia_os)/config.h', |
| 404 '../third_party/yasm/config/<(skia_os)/libyasm-stdint.h', |
| 405 ], |
| 406 }, |
| 407 { |
| 408 'target_name': 'generate_files', |
| 409 'type': 'none', |
| 410 'toolsets': ['host'], |
| 411 'dependencies': [ |
| 412 'genperf', |
| 413 'genversion', |
| 414 ], |
| 415 'sources': [ |
| 416 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
cpu.gperf', |
| 417 '../third_party/externals/yasm/source/patched-yasm/modules/arch/x86/x86
regtmod.gperf', |
| 418 ], |
| 419 'rules': [ |
| 420 { |
| 421 'rule_name': 'generate_gperf', |
| 422 'extension': 'gperf', |
| 423 'inputs': [ '<(PRODUCT_DIR)/' |
| 424 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], |
| 425 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], |
| 426 'action': [ |
| 427 '<(PRODUCT_DIR)/genperf', |
| 428 '<(RULE_INPUT_PATH)', |
| 429 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', |
| 430 ], |
| 431 'process_outputs_as_sources': 0, |
| 432 'message': 'yasm genperf for <(RULE_INPUT_PATH)', |
| 433 }, |
| 434 ], |
| 435 'actions': [ |
| 436 { |
| 437 'action_name': 'generate_x86_insn', |
| 438 'variables': { |
| 439 'gen_insn_path': |
| 440 '../third_party/externals/yasm/source/patched-yasm/modules/arch/
x86/gen_x86_insn.py', |
| 441 }, |
| 442 'inputs': [ '<(gen_insn_path)', ], |
| 443 'outputs': [ |
| 444 '<(shared_generated_dir)/x86insns.c', |
| 445 '<(shared_generated_dir)/x86insn_gas.gperf', |
| 446 '<(shared_generated_dir)/x86insn_nasm.gperf', |
| 447 ], |
| 448 'action': [ |
| 449 'python', |
| 450 '<(gen_insn_path)', |
| 451 '<(shared_generated_dir)', |
| 452 ], |
| 453 'message': 'Running <(gen_insn_path)', |
| 454 'process_outputs_as_sources': 0, |
| 455 }, |
| 456 { |
| 457 'action_name': 'generate_version', |
| 458 'inputs': [ '<(PRODUCT_DIR)/' |
| 459 '<(EXECUTABLE_PREFIX)genversion<(EXECUTABLE_SUFFIX)' ], |
| 460 'outputs': [ '<(shared_generated_dir)/<(version_file)', ], |
| 461 'action': [ |
| 462 '<(PRODUCT_DIR)/genversion', |
| 463 '<(shared_generated_dir)/<(version_file)' |
| 464 ], |
| 465 'message': 'Generating yasm version file: ' |
| 466 '<(shared_generated_dir)/<(version_file)', |
| 467 'process_outputs_as_sources': 0, |
| 468 }, |
| 469 ], |
| 470 }, |
| 471 { |
| 472 'target_name': 'genperf_libs', |
| 473 'type': 'static_library', |
| 474 'toolsets': ['host'], |
| 475 'dependencies': [ 'config_sources', ], |
| 476 'sources': [ |
| 477 '../third_party/externals/yasm/source/patched-yasm/libyasm/phash.c', |
| 478 '../third_party/externals/yasm/source/patched-yasm/libyasm/xmalloc.c', |
| 479 '../third_party/externals/yasm/source/patched-yasm/libyasm/xstrdup.c', |
| 480 ], |
| 481 'include_dirs': [ |
| 482 '<@(yasm_include_dirs)', |
| 483 ], |
| 484 'defines': [ '<@(yasm_defines)' ], |
| 485 'cflags': [ |
| 486 '<@(yasm_cflags)', |
| 487 ], |
| 488 'cflags!': [ |
| 489 '-mfpu=neon', |
| 490 '-mthumb', |
| 491 '-march=armv7-a', |
| 492 ], |
| 493 }, |
| 494 { |
| 495 'target_name': 'genstring', |
| 496 'type': 'executable', |
| 497 'toolsets': ['host'], |
| 498 'dependencies': [ 'config_sources', ], |
| 499 'sources': [ |
| 500 '../third_party/externals/yasm/source/patched-yasm/genstring.c', |
| 501 ], |
| 502 'include_dirs': [ |
| 503 '<@(yasm_include_dirs)', |
| 504 ], |
| 505 'cflags': [ |
| 506 '-std=gnu99', |
| 507 '-w', |
| 508 ], |
| 509 'cflags!': [ |
| 510 '-mfpu=neon', |
| 511 '-mthumb', |
| 512 '-march=armv7-a', |
| 513 ], |
| 514 }, |
| 515 { |
| 516 'target_name': 'genperf', |
| 517 'type': 'executable', |
| 518 'toolsets': ['host'], |
| 519 'dependencies': [ |
| 520 'genperf_libs', |
| 521 ], |
| 522 'sources': [ |
| 523 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/genper
f.c', |
| 524 '../third_party/externals/yasm/source/patched-yasm/tools/genperf/perfec
t.c', |
| 525 ], |
| 526 'include_dirs': [ |
| 527 '<@(yasm_include_dirs)', |
| 528 ], |
| 529 'cflags': [ |
| 530 '-std=gnu99', |
| 531 '-w', |
| 532 ], |
| 533 'cflags!': [ |
| 534 '-mfpu=neon', |
| 535 '-mthumb', |
| 536 '-march=armv7-a', |
| 537 ], |
| 538 }, |
| 539 { |
| 540 'target_name': 'genmacro', |
| 541 'type': 'executable', |
| 542 'toolsets': ['host'], |
| 543 'dependencies': [ 'config_sources', ], |
| 544 'sources': [ |
| 545 '../third_party/externals/yasm/source/patched-yasm/tools/genmacro/genmac
ro.c', |
| 546 ], |
| 547 'include_dirs': [ |
| 548 '<@(yasm_include_dirs)', |
| 549 ], |
| 550 'cflags': [ |
| 551 '-std=gnu99', |
| 552 '-w', |
| 553 ], |
| 554 'cflags!': [ |
| 555 '-mfpu=neon', |
| 556 '-mthumb', |
| 557 '-march=armv7-a', |
| 558 ], |
| 559 }, |
| 560 { |
| 561 'target_name': 'genversion', |
| 562 'type': 'executable', |
| 563 'toolsets': ['host'], |
| 564 'dependencies': [ 'config_sources', ], |
| 565 'sources': [ |
| 566 '../third_party/externals/yasm/source/patched-yasm/modules/preprocs/nas
m/genversion.c', |
| 567 ], |
| 568 'include_dirs': [ |
| 569 '<@(yasm_include_dirs)', |
| 570 ], |
| 571 'cflags': [ |
| 572 '-std=gnu99', |
| 573 '-w', |
| 574 ], |
| 575 'cflags!': [ |
| 576 '-mfpu=neon', |
| 577 '-mthumb', |
| 578 '-march=armv7-a', |
| 579 ], |
| 580 }, |
| 581 { |
| 582 'target_name': 're2c', |
| 583 'type': 'executable', |
| 584 'toolsets': ['host'], |
| 585 'dependencies': [ 'config_sources', ], |
| 586 'sources': [ |
| 587 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/main.c', |
| 588 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/code.c', |
| 589 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/dfa.c', |
| 590 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/parser.c'
, |
| 591 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/actions.c
', |
| 592 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/scanner.c
', |
| 593 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/mbo_getop
t.c', |
| 594 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/substr.c'
, |
| 595 '../third_party/externals/yasm/source/patched-yasm/tools/re2c/translate
.c', |
| 596 ], |
| 597 'include_dirs': [ |
| 598 '<@(yasm_include_dirs)', |
| 599 ], |
| 600 'cflags': [ |
| 601 '-std=gnu99', |
| 602 '-w', |
| 603 ], |
| 604 'cflags!': [ |
| 605 '-mfpu=neon', |
| 606 '-mthumb', |
| 607 '-march=armv7-a', |
| 608 ], |
| 609 'xcode_settings': { |
| 610 'WARNING_CFLAGS': [ |
| 611 '-w', |
| 612 ], |
| 613 }, |
| 614 'variables': { |
| 615 # re2c is missing CLOSEVOP from one switch. |
| 616 'clang_warning_flags': [ '-Wno-switch' ], |
| 617 }, |
| 618 'msvs_disabled_warnings': [ 4267 ], |
| 619 }, |
| 620 { |
| 621 'target_name': 'genmodule', |
| 622 'type': 'executable', |
| 623 'toolsets': ['host'], |
| 624 'dependencies': [ |
| 625 'config_sources', |
| 626 ], |
| 627 'sources': [ |
| 628 '../third_party/externals/yasm/source/patched-yasm/libyasm/genmodule.c', |
| 629 ], |
| 630 'include_dirs': [ |
| 631 '<@(yasm_include_dirs)', |
| 632 |
| 633 ], |
| 634 'cflags': [ |
| 635 '-std=gnu99', |
| 636 ], |
| 637 'cflags!': [ |
| 638 '-mfpu=neon', |
| 639 '-mthumb', |
| 640 '-march=armv7-a', |
| 641 ], |
| 642 }, |
| 643 ], |
| 644 } |
OLD | NEW |