| 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) |
| 11 # 2) C source files that are #included by static C sources (eg., license.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 | 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) | 13 # further generate files in category #1 or #2. (eg., version.mac) |
| 14 # | 14 # |
| 15 # This structure is represented with the following targets: | 15 # This structure is represented with the following targets: |
| 16 # 1) yasm -- Sources, flags for the main yasm executable. Also has most of | 16 # 1) yasm -- Sources, flags for the main yasm executable. Also has most of |
| 17 # of the actions and rules that invoke the subprograms. | 17 # of the actions and rules that invoke the subprograms. |
| 18 # 2) yasm_config -- General build configuration including setting a | 18 # 2) yasm_config -- General build configuration including setting a |
| 19 # source_prereqs listing the checked in version of files | 19 # source_prereqs listing the checked in version of files |
| 20 # generated by manually running configure. These manually | 20 # generated by manually running configure. These manually |
| 21 # generated files are used by all binaries. | 21 # generated files are used by all binaries. |
| 22 # 3) yasm_utils -- Object files with memory management and hashing utilities | 22 # 3) yasm_utils -- Object files with memory management and hashing utilities |
| 23 # shared between yasm and the genperf subprogram. | 23 # shared between yasm and the genperf subprogram. |
| 24 # 4) genmacro, genmodule, etc. -- One executable target for each subprogram. | 24 # 4) genmacro, genmodule, etc. -- One executable target for each subprogram. |
| 25 # 5) generate_license, generate_module, etc. -- Actions that invoke programs | 25 # 5) generate_license, generate_module, etc. -- Actions that invoke programs |
| 26 # built in #4 to generate .c files. | 26 # built in #4 to generate .c files. |
| 27 # 6) compile_gperf, compile_re2c, etc. -- Actions that invoke programs that | 27 # 6) compile_gperf, compile_re2c, etc. -- Actions that invoke programs that |
| 28 # turn intermediate files into .c files. | 28 # turn intermediate files into .c files. |
| 29 | 29 |
| 30 if (default_toolchain == host_toolchain) { | 30 if (current_toolchain == host_toolchain) { |
| 31 | 31 |
| 32 # Various files referenced by multiple targets. | 32 # Various files referenced by multiple targets. |
| 33 yasm_gen_include_dir = "$target_gen_dir/include" | 33 yasm_gen_include_dir = "$target_gen_dir/include" |
| 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 = [ |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" | 393 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" |
| 394 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 394 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
| 395 outputs = [ | 395 outputs = [ |
| 396 "$yasm_gen_include_dir/x86insns.c", | 396 "$yasm_gen_include_dir/x86insns.c", |
| 397 "$yasm_gen_include_dir/x86insn_gas.gperf", | 397 "$yasm_gen_include_dir/x86insn_gas.gperf", |
| 398 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 398 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
| 399 ] | 399 ] |
| 400 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 400 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
| 401 } | 401 } |
| 402 } | 402 } |
| OLD | NEW |