| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 "$target_gen_dir/lc3bid.c", | 243 "$target_gen_dir/lc3bid.c", |
| 244 | 244 |
| 245 # File generated by generate_module | 245 # File generated by generate_module |
| 246 "$target_gen_dir/module.c", | 246 "$target_gen_dir/module.c", |
| 247 ] | 247 ] |
| 248 | 248 |
| 249 configs -= [ "//build/config/compiler:chromium_code" ] | 249 configs -= [ "//build/config/compiler:chromium_code" ] |
| 250 configs += [ | 250 configs += [ |
| 251 ":yasm_config", | 251 ":yasm_config", |
| 252 "//build/config/compiler:no_chromium_code", | 252 "//build/config/compiler:no_chromium_code", |
| 253 "//build/config/compiler:no_incompatible_pointer_warnings", |
| 253 ] | 254 ] |
| 254 | 255 |
| 255 # Yasm generates a bunch of .c files which its source file #include. | 256 # Yasm generates a bunch of .c files which its source file #include. |
| 256 # Add the |target_gen_dir| into the include path so it can find them. | 257 # Add the |target_gen_dir| into the include path so it can find them. |
| 257 # Ideally, these generated .c files would be placed into a separate | 258 # Ideally, these generated .c files would be placed into a separate |
| 258 # directory, but the gen_x86_insn.py script does not make this easy. | 259 # directory, but the gen_x86_insn.py script does not make this easy. |
| 259 include_dirs = [ yasm_gen_include_dir ] | 260 include_dirs = [ yasm_gen_include_dir ] |
| 260 | 261 |
| 261 if (!is_win) { | 262 if (!is_win) { |
| 262 cflags = [ | 263 cflags = [ |
| 263 "-ansi", | 264 "-ansi", |
| 264 "-pedantic", | 265 "-pedantic", |
| 265 ] | 266 ] |
| 266 if (is_clang) { | |
| 267 cflags += [ "-Wno-incompatible-pointer-types" ] | |
| 268 } | |
| 269 } | 267 } |
| 270 | 268 |
| 271 # TODO(ajwong): This should take most of the generated output as | 269 # TODO(ajwong): This should take most of the generated output as |
| 272 # inputs. | 270 # inputs. |
| 273 deps = [ | 271 deps = [ |
| 274 ":compile_gperf", | 272 ":compile_gperf", |
| 275 ":compile_gperf_for_include", | 273 ":compile_gperf_for_include", |
| 276 ":compile_nasm_macros", | 274 ":compile_nasm_macros", |
| 277 ":compile_nasm_version", | 275 ":compile_nasm_version", |
| 278 ":compile_re2c_lc3b", | 276 ":compile_re2c_lc3b", |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 478 |
| 481 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 479 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
| 482 outputs = [ | 480 outputs = [ |
| 483 "$yasm_gen_include_dir/x86insns.c", | 481 "$yasm_gen_include_dir/x86insns.c", |
| 484 "$yasm_gen_include_dir/x86insn_gas.gperf", | 482 "$yasm_gen_include_dir/x86insn_gas.gperf", |
| 485 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 483 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
| 486 ] | 484 ] |
| 487 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 485 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
| 488 } | 486 } |
| 489 } | 487 } |
| OLD | NEW |