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