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 13 matching lines...) Expand all Loading... |
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 (current_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 yasm_os = os |
| 35 if (is_chromeos) { |
| 36 yasm_os = "linux" |
| 37 } |
| 38 config_makefile = "source/config/$yasm_os/Makefile" |
35 version_file = "version.mac" | 39 version_file = "version.mac" |
36 | 40 |
37 import("//build/compiled_action.gni") | 41 import("//build/compiled_action.gni") |
38 | 42 |
39 config("yasm_config") { | 43 config("yasm_config") { |
40 include_dirs = [ | 44 include_dirs = [ |
41 "source/config/$os", | 45 "source/config/$yasm_os", |
42 "source/patched-yasm", | 46 "source/patched-yasm", |
43 ] | 47 ] |
44 defines = [ "HAVE_CONFIG_H" ] | 48 defines = [ "HAVE_CONFIG_H" ] |
45 if (is_posix) { | 49 if (is_posix) { |
46 cflags = [ "-std=gnu99" ] | 50 cflags = [ "-std=gnu99" ] |
47 } | 51 } |
48 } | 52 } |
49 | 53 |
50 executable("genmacro") { | 54 executable("genmacro") { |
51 sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ] | 55 sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ] |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" | 407 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" |
404 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 408 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
405 outputs = [ | 409 outputs = [ |
406 "$yasm_gen_include_dir/x86insns.c", | 410 "$yasm_gen_include_dir/x86insns.c", |
407 "$yasm_gen_include_dir/x86insn_gas.gperf", | 411 "$yasm_gen_include_dir/x86insn_gas.gperf", |
408 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 412 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
409 ] | 413 ] |
410 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 414 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
411 } | 415 } |
412 } | 416 } |
OLD | NEW |