Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: third_party/yasm/BUILD.gn

Issue 774353003: gn format // (the rest) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase net Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/widevine/cdm/BUILD.gn ('k') | third_party/yasm/yasm_assemble.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # The yasm build process creates a slew of small C subprograms that 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 6 # dynamically generate files at various point in the build process. This makes
7 # the build integration moderately complex. 7 # the build integration moderately complex.
8 # 8 #
9 # There are three classes of dynamically generated files: 9 # There are three classes of dynamically generated files:
10 # 1) C source files that should be included in the build (eg., lc3bid.c) 10 # 1) C source files that should be included in the build (eg., lc3bid.c)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ] 278 ]
279 } 279 }
280 280
281 compiled_action_foreach("compile_gperf") { 281 compiled_action_foreach("compile_gperf") {
282 tool = ":genperf" 282 tool = ":genperf"
283 sources = [ 283 sources = [
284 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", 284 "source/patched-yasm/modules/arch/x86/x86cpu.gperf",
285 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", 285 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf",
286 ] 286 ]
287 287
288 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] 288 outputs = [
289 "$target_gen_dir/{{source_name_part}}.c",
290 ]
289 args = [ 291 args = [
290 "{{source}}", 292 "{{source}}",
291 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", 293 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c",
292 ] 294 ]
293 deps = [ 295 deps = [
294 ":generate_x86_insn", 296 ":generate_x86_insn",
295 ] 297 ]
296 } 298 }
297 299
298 # This differs from |compile_gperf| in where it places it output files. 300 # This differs from |compile_gperf| in where it places it output files.
299 compiled_action_foreach("compile_gperf_for_include") { 301 compiled_action_foreach("compile_gperf_for_include") {
300 tool = ":genperf" 302 tool = ":genperf"
301 sources = [ 303 sources = [
302 # Make sure the generated gperf files in $target_gen_dir are synced with 304 # Make sure the generated gperf files in $target_gen_dir are synced with
303 # the outputs for the related generate_*_insn actions in the 305 # the outputs for the related generate_*_insn actions in the
304 # generate_files target below. 306 # generate_files target below.
305 # 307 #
306 # The output for these two are #included by 308 # The output for these two are #included by
307 # source/patched-yasm/modules/arch/x86/x86id.c 309 # source/patched-yasm/modules/arch/x86/x86id.c
308 "$yasm_gen_include_dir/x86insn_gas.gperf", 310 "$yasm_gen_include_dir/x86insn_gas.gperf",
309 "$yasm_gen_include_dir/x86insn_nasm.gperf", 311 "$yasm_gen_include_dir/x86insn_nasm.gperf",
310 ] 312 ]
311 313
312 outputs = [ "$yasm_gen_include_dir/{{source_name_part}}.c" ] 314 outputs = [
315 "$yasm_gen_include_dir/{{source_name_part}}.c",
316 ]
313 args = [ 317 args = [
314 "{{source}}", 318 "{{source}}",
315 rebase_path(yasm_gen_include_dir, root_build_dir) + 319 rebase_path(yasm_gen_include_dir, root_build_dir) +
316 "/{{source_name_part}}.c", 320 "/{{source_name_part}}.c",
317 ] 321 ]
318 deps = [ 322 deps = [
319 ":generate_x86_insn", 323 ":generate_x86_insn",
320 ] 324 ]
321 } 325 }
322 326
(...skipping 14 matching lines...) Expand all
337 } 341 }
338 } 342 }
339 } 343 }
340 344
341 compile_macro("compile_nasm_macros") { 345 compile_macro("compile_nasm_macros") {
342 # Output #included by 346 # Output #included by
343 # source/patched-yasm/modules/preprocs/nasm/nasm-parser.c 347 # source/patched-yasm/modules/preprocs/nasm/nasm-parser.c
344 sources = [ 348 sources = [
345 "source/patched-yasm/modules/parsers/nasm/nasm-std.mac", 349 "source/patched-yasm/modules/parsers/nasm/nasm-std.mac",
346 ] 350 ]
347 outputs = [ "$yasm_gen_include_dir/nasm-macros.c" ] 351 outputs = [
352 "$yasm_gen_include_dir/nasm-macros.c",
353 ]
348 macro_varname = "nasm_standard_mac" 354 macro_varname = "nasm_standard_mac"
349 } 355 }
350 356
351 compile_macro("compile_nasm_version") { 357 compile_macro("compile_nasm_version") {
352 # Output #included by 358 # Output #included by
353 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c 359 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c
354 sources = [ 360 sources = [
355 "$target_gen_dir/$version_file", 361 "$target_gen_dir/$version_file",
356 ] 362 ]
357 outputs = [ "$yasm_gen_include_dir/nasm-version.c" ] 363 outputs = [
364 "$yasm_gen_include_dir/nasm-version.c",
365 ]
358 macro_varname = "nasm_version_mac" 366 macro_varname = "nasm_version_mac"
359 deps = [ 367 deps = [
360 ":generate_version", 368 ":generate_version",
361 ] 369 ]
362 } 370 }
363 371
364 compile_macro("compile_win64_gas") { 372 compile_macro("compile_win64_gas") {
365 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. 373 # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
366 sources = [ 374 sources = [
367 "source/patched-yasm/modules/objfmts/coff/win64-gas.mac", 375 "source/patched-yasm/modules/objfmts/coff/win64-gas.mac",
368 ] 376 ]
369 outputs = [ "$yasm_gen_include_dir/win64-gas.c" ] 377 outputs = [
378 "$yasm_gen_include_dir/win64-gas.c",
379 ]
370 macro_varname = "win64_gas_stdmac" 380 macro_varname = "win64_gas_stdmac"
371 } 381 }
372 382
373 compile_macro("compile_win64_nasm") { 383 compile_macro("compile_win64_nasm") {
374 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. 384 # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
375 sources = [ 385 sources = [
376 "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac", 386 "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac",
377 ] 387 ]
378 outputs = [ "$yasm_gen_include_dir/win64-nasm.c" ] 388 outputs = [
389 "$yasm_gen_include_dir/win64-nasm.c",
390 ]
379 macro_varname = "win64_nasm_stdmac" 391 macro_varname = "win64_nasm_stdmac"
380 } 392 }
381 393
382 compiled_action_foreach("compile_re2c") { 394 compiled_action_foreach("compile_re2c") {
383 tool = ":re2c" 395 tool = ":re2c"
384 sources = [ 396 sources = [
385 "source/patched-yasm/modules/parsers/gas/gas-token.re", 397 "source/patched-yasm/modules/parsers/gas/gas-token.re",
386 "source/patched-yasm/modules/parsers/nasm/nasm-token.re", 398 "source/patched-yasm/modules/parsers/nasm/nasm-token.re",
387 ] 399 ]
388 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] 400 outputs = [
401 "$target_gen_dir/{{source_name_part}}.c",
402 ]
389 args = [ 403 args = [
390 "-b", 404 "-b",
391 "-o", 405 "-o",
392 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", 406 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c",
393 "{{source}}", 407 "{{source}}",
394 ] 408 ]
395 } 409 }
396 410
397 # This call doesn't fit into the re2c template above. 411 # This call doesn't fit into the re2c template above.
398 compiled_action("compile_re2c_lc3b") { 412 compiled_action("compile_re2c_lc3b") {
399 tool = ":re2c" 413 tool = ":re2c"
400 inputs = [ 414 inputs = [
401 "source/patched-yasm/modules/arch/lc3b/lc3bid.re", 415 "source/patched-yasm/modules/arch/lc3b/lc3bid.re",
402 ] 416 ]
403 outputs = [ "$target_gen_dir/lc3bid.c" ] 417 outputs = [
418 "$target_gen_dir/lc3bid.c",
419 ]
404 args = [ 420 args = [
405 "-s", 421 "-s",
406 "-o", 422 "-o",
407 rebase_path(outputs[0], root_build_dir), 423 rebase_path(outputs[0], root_build_dir),
408 rebase_path(inputs[0], root_build_dir), 424 rebase_path(inputs[0], root_build_dir),
409 ] 425 ]
410 } 426 }
411 427
412 compiled_action("generate_license") { 428 compiled_action("generate_license") {
413 tool = ":genstring" 429 tool = ":genstring"
414 430
415 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. 431 # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
416 inputs = [ 432 inputs = [
417 "source/patched-yasm/COPYING", 433 "source/patched-yasm/COPYING",
418 ] 434 ]
419 outputs = [ "$yasm_gen_include_dir/license.c" ] 435 outputs = [
436 "$yasm_gen_include_dir/license.c",
437 ]
420 args = [ 438 args = [
421 "license_msg", 439 "license_msg",
422 rebase_path(outputs[0], root_build_dir), 440 rebase_path(outputs[0], root_build_dir),
423 rebase_path(inputs[0], root_build_dir), 441 rebase_path(inputs[0], root_build_dir),
424 ] 442 ]
425 } 443 }
426 444
427 compiled_action("generate_module") { 445 compiled_action("generate_module") {
428 tool = ":genmodule" 446 tool = ":genmodule"
429 inputs = [ 447 inputs = [
430 "source/patched-yasm/libyasm/module.in", 448 "source/patched-yasm/libyasm/module.in",
431 config_makefile, 449 config_makefile,
432 ] 450 ]
433 outputs = [ "$target_gen_dir/module.c" ] 451 outputs = [
452 "$target_gen_dir/module.c",
453 ]
434 args = [ 454 args = [
435 rebase_path(inputs[0], root_build_dir), 455 rebase_path(inputs[0], root_build_dir),
436 rebase_path(config_makefile, root_build_dir), 456 rebase_path(config_makefile, root_build_dir),
437 rebase_path(outputs[0], root_build_dir), 457 rebase_path(outputs[0], root_build_dir),
438 ] 458 ]
439 } 459 }
440 460
441 compiled_action("generate_version") { 461 compiled_action("generate_version") {
442 tool = ":genversion" 462 tool = ":genversion"
443 outputs = [ "$target_gen_dir/$version_file" ] 463 outputs = [
464 "$target_gen_dir/$version_file",
465 ]
444 args = [ rebase_path(outputs[0], root_build_dir) ] 466 args = [ rebase_path(outputs[0], root_build_dir) ]
445 } 467 }
446 468
447 action("generate_x86_insn") { 469 action("generate_x86_insn") {
448 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" 470 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py"
449 471
450 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c 472 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c
451 outputs = [ 473 outputs = [
452 "$yasm_gen_include_dir/x86insns.c", 474 "$yasm_gen_include_dir/x86insns.c",
453 "$yasm_gen_include_dir/x86insn_gas.gperf", 475 "$yasm_gen_include_dir/x86insn_gas.gperf",
454 "$yasm_gen_include_dir/x86insn_nasm.gperf", 476 "$yasm_gen_include_dir/x86insn_nasm.gperf",
455 ] 477 ]
456 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] 478 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ]
457 } 479 }
458 } 480 }
OLDNEW
« no previous file with comments | « third_party/widevine/cdm/BUILD.gn ('k') | third_party/yasm/yasm_assemble.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698