OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 config_makefile = "source/config/$os/Makefile" | 34 config_makefile = "source/config/$os/Makefile" |
35 version_file = "version.mac" | 35 version_file = "version.mac" |
36 | 36 |
37 import("//build/compiled_action.gni") | 37 import("//build/compiled_action.gni") |
38 | 38 |
39 config("yasm_config") { | 39 config("yasm_config") { |
40 include_dirs = [ | 40 include_dirs = [ |
41 "source/config/$os", | 41 "source/config/$os", |
42 "source/patched-yasm", | 42 "source/patched-yasm", |
43 ] | 43 ] |
44 inputs = [ | |
45 config_makefile, | |
46 "source/config/$os/config.h", | |
47 "source/config/$os/libyasm-stdint.h", | |
48 ] | |
49 defines = [ "HAVE_CONFIG_H" ] | 44 defines = [ "HAVE_CONFIG_H" ] |
50 if (is_posix) { | 45 if (is_posix) { |
51 cflags = [ "-std=gnu99" ] | 46 cflags = [ "-std=gnu99" ] |
52 } | 47 } |
53 } | 48 } |
54 | 49 |
55 executable("genmacro") { | 50 executable("genmacro") { |
56 sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ] | 51 sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ] |
57 configs -= [ "//build/config/compiler:chromium_code" ] | 52 configs -= [ "//build/config/compiler:chromium_code" ] |
58 configs += [ ":yasm_config", | 53 configs += [ ":yasm_config", |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 outputs = [ "$yasm_gen_include_dir/license.c" ] | 368 outputs = [ "$yasm_gen_include_dir/license.c" ] |
374 args = [ | 369 args = [ |
375 "license_msg", | 370 "license_msg", |
376 rebase_path(outputs[0], root_build_dir), | 371 rebase_path(outputs[0], root_build_dir), |
377 rebase_path(sources[0], root_build_dir), | 372 rebase_path(sources[0], root_build_dir), |
378 ] | 373 ] |
379 } | 374 } |
380 | 375 |
381 compiled_action("generate_module") { | 376 compiled_action("generate_module") { |
382 tool = ":genmodule" | 377 tool = ":genmodule" |
| 378 inputs = [ config_makefile ] |
383 sources = [ "source/patched-yasm/libyasm/module.in" ] | 379 sources = [ "source/patched-yasm/libyasm/module.in" ] |
384 outputs = [ "$target_gen_dir/module.c" ] | 380 outputs = [ "$target_gen_dir/module.c" ] |
385 args = [ | 381 args = [ |
386 rebase_path(sources[0], root_build_dir), | 382 rebase_path(sources[0], root_build_dir), |
387 rebase_path(config_makefile, root_build_dir), | 383 rebase_path(config_makefile, root_build_dir), |
388 rebase_path(outputs[0], root_build_dir), | 384 rebase_path(outputs[0], root_build_dir), |
389 ] | 385 ] |
390 } | 386 } |
391 | 387 |
392 compiled_action("generate_version") { | 388 compiled_action("generate_version") { |
393 tool = ":genversion" | 389 tool = ":genversion" |
394 outputs = [ "$target_gen_dir/$version_file" ] | 390 outputs = [ "$target_gen_dir/$version_file" ] |
395 args = [ | 391 args = [ |
396 rebase_path(outputs[0], | 392 rebase_path(outputs[0], |
397 root_build_dir) | 393 root_build_dir) |
398 ] | 394 ] |
399 } | 395 } |
400 | 396 |
401 action("generate_x86_insn") { | 397 action("generate_x86_insn") { |
402 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" | 398 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" |
403 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 399 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
404 outputs = [ | 400 outputs = [ |
405 "$yasm_gen_include_dir/x86insns.c", | 401 "$yasm_gen_include_dir/x86insns.c", |
406 "$yasm_gen_include_dir/x86insn_gas.gperf", | 402 "$yasm_gen_include_dir/x86insn_gas.gperf", |
407 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 403 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
408 ] | 404 ] |
409 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 405 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
410 } | 406 } |
411 } | 407 } |
OLD | NEW |