| 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 10 matching lines...) Expand all Loading... |
| 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 (current_toolchain == host_toolchain) { | 30 if (current_toolchain == host_toolchain) { |
| 31 | |
| 32 # Various files referenced by multiple targets. | 31 # Various files referenced by multiple targets. |
| 33 yasm_gen_include_dir = "$target_gen_dir/include" | 32 yasm_gen_include_dir = "$target_gen_dir/include" |
| 34 yasm_os = os | 33 yasm_os = os |
| 35 if (is_chromeos) { | 34 if (is_chromeos) { |
| 36 yasm_os = "linux" | 35 yasm_os = "linux" |
| 37 } | 36 } |
| 38 config_makefile = "source/config/$yasm_os/Makefile" | 37 config_makefile = "source/config/$yasm_os/Makefile" |
| 39 version_file = "version.mac" | 38 version_file = "version.mac" |
| 40 | 39 |
| 41 import("//build/compiled_action.gni") | 40 import("//build/compiled_action.gni") |
| 42 | 41 |
| 43 config("yasm_config") { | 42 config("yasm_config") { |
| 44 include_dirs = [ | 43 include_dirs = [ |
| 45 "source/config/$yasm_os", | 44 "source/config/$yasm_os", |
| 46 "source/patched-yasm", | 45 "source/patched-yasm", |
| 47 ] | 46 ] |
| 48 defines = [ "HAVE_CONFIG_H" ] | 47 defines = [ "HAVE_CONFIG_H" ] |
| 49 if (is_posix) { | 48 if (is_posix) { |
| 50 cflags = [ "-std=gnu99" ] | 49 cflags = [ "-std=gnu99" ] |
| 51 } | 50 } |
| 52 } | 51 } |
| 53 | 52 |
| 54 executable("genmacro") { | 53 executable("genmacro") { |
| 55 sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ] | 54 sources = [ |
| 55 "source/patched-yasm/tools/genmacro/genmacro.c", |
| 56 ] |
| 56 configs -= [ "//build/config/compiler:chromium_code" ] | 57 configs -= [ "//build/config/compiler:chromium_code" ] |
| 57 configs += [ ":yasm_config", | 58 configs += [ |
| 58 "//build/config/compiler:no_chromium_code" ] | 59 ":yasm_config", |
| 60 "//build/config/compiler:no_chromium_code", |
| 61 ] |
| 59 } | 62 } |
| 60 | 63 |
| 61 executable("genmodule") { | 64 executable("genmodule") { |
| 62 sources = [ "source/patched-yasm/libyasm/genmodule.c" ] | 65 sources = [ |
| 66 "source/patched-yasm/libyasm/genmodule.c", |
| 67 ] |
| 63 configs -= [ "//build/config/compiler:chromium_code" ] | 68 configs -= [ "//build/config/compiler:chromium_code" ] |
| 64 configs += [ ":yasm_config", | 69 configs += [ |
| 65 "//build/config/compiler:no_chromium_code" ] | 70 ":yasm_config", |
| 71 "//build/config/compiler:no_chromium_code", |
| 72 ] |
| 66 } | 73 } |
| 67 | 74 |
| 68 executable("genperf") { | 75 executable("genperf") { |
| 69 sources = [ | 76 sources = [ |
| 70 "source/patched-yasm/tools/genperf/genperf.c", | 77 "source/patched-yasm/tools/genperf/genperf.c", |
| 71 "source/patched-yasm/tools/genperf/perfect.c", | 78 "source/patched-yasm/tools/genperf/perfect.c", |
| 72 ] | 79 ] |
| 73 | 80 |
| 74 configs -= [ "//build/config/compiler:chromium_code" ] | 81 configs -= [ "//build/config/compiler:chromium_code" ] |
| 75 configs += [ ":yasm_config", | 82 configs += [ |
| 76 "//build/config/compiler:no_chromium_code" ] | 83 ":yasm_config", |
| 84 "//build/config/compiler:no_chromium_code", |
| 85 ] |
| 77 | 86 |
| 78 deps = [ ":yasm_utils" ] | 87 deps = [ |
| 88 ":yasm_utils", |
| 89 ] |
| 79 } | 90 } |
| 80 | 91 |
| 81 # Used by both yasm and genperf binaries. | 92 # Used by both yasm and genperf binaries. |
| 82 source_set("yasm_utils") { | 93 source_set("yasm_utils") { |
| 83 sources = [ | 94 sources = [ |
| 84 "source/patched-yasm/libyasm/phash.c", | 95 "source/patched-yasm/libyasm/phash.c", |
| 85 "source/patched-yasm/libyasm/xmalloc.c", | 96 "source/patched-yasm/libyasm/xmalloc.c", |
| 86 "source/patched-yasm/libyasm/xstrdup.c", | 97 "source/patched-yasm/libyasm/xstrdup.c", |
| 87 ] | 98 ] |
| 88 | 99 |
| 89 configs -= [ "//build/config/compiler:chromium_code" ] | 100 configs -= [ "//build/config/compiler:chromium_code" ] |
| 90 configs += [ ":yasm_config", | 101 configs += [ |
| 91 "//build/config/compiler:no_chromium_code" ] | 102 ":yasm_config", |
| 103 "//build/config/compiler:no_chromium_code", |
| 104 ] |
| 92 } | 105 } |
| 93 | 106 |
| 94 executable("genstring") { | 107 executable("genstring") { |
| 95 sources = [ "source/patched-yasm/genstring.c", ] | 108 sources = [ |
| 109 "source/patched-yasm/genstring.c", |
| 110 ] |
| 96 configs -= [ "//build/config/compiler:chromium_code" ] | 111 configs -= [ "//build/config/compiler:chromium_code" ] |
| 97 configs += [ ":yasm_config", | 112 configs += [ |
| 98 "//build/config/compiler:no_chromium_code" ] | 113 ":yasm_config", |
| 114 "//build/config/compiler:no_chromium_code", |
| 115 ] |
| 99 } | 116 } |
| 100 | 117 |
| 101 executable("genversion") { | 118 executable("genversion") { |
| 102 sources = [ "source/patched-yasm/modules/preprocs/nasm/genversion.c" ] | 119 sources = [ |
| 120 "source/patched-yasm/modules/preprocs/nasm/genversion.c", |
| 121 ] |
| 103 configs -= [ "//build/config/compiler:chromium_code" ] | 122 configs -= [ "//build/config/compiler:chromium_code" ] |
| 104 configs += [ ":yasm_config", | 123 configs += [ |
| 105 "//build/config/compiler:no_chromium_code" ] | 124 ":yasm_config", |
| 125 "//build/config/compiler:no_chromium_code", |
| 126 ] |
| 106 } | 127 } |
| 107 | 128 |
| 108 executable("re2c") { | 129 executable("re2c") { |
| 109 sources = [ | 130 sources = [ |
| 110 "source/patched-yasm/tools/re2c/main.c", | 131 "source/patched-yasm/tools/re2c/main.c", |
| 111 "source/patched-yasm/tools/re2c/code.c", | 132 "source/patched-yasm/tools/re2c/code.c", |
| 112 "source/patched-yasm/tools/re2c/dfa.c", | 133 "source/patched-yasm/tools/re2c/dfa.c", |
| 113 "source/patched-yasm/tools/re2c/parser.c", | 134 "source/patched-yasm/tools/re2c/parser.c", |
| 114 "source/patched-yasm/tools/re2c/actions.c", | 135 "source/patched-yasm/tools/re2c/actions.c", |
| 115 "source/patched-yasm/tools/re2c/scanner.c", | 136 "source/patched-yasm/tools/re2c/scanner.c", |
| 116 "source/patched-yasm/tools/re2c/mbo_getopt.c", | 137 "source/patched-yasm/tools/re2c/mbo_getopt.c", |
| 117 "source/patched-yasm/tools/re2c/substr.c", | 138 "source/patched-yasm/tools/re2c/substr.c", |
| 118 "source/patched-yasm/tools/re2c/translate.c", | 139 "source/patched-yasm/tools/re2c/translate.c", |
| 119 ] | 140 ] |
| 120 | 141 |
| 121 configs -= [ "//build/config/compiler:chromium_code" ] | 142 configs -= [ "//build/config/compiler:chromium_code" ] |
| 122 configs += [ ":yasm_config", | 143 configs += [ |
| 123 "//build/config/compiler:no_chromium_code" ] | 144 ":yasm_config", |
| 145 "//build/config/compiler:no_chromium_code", |
| 146 ] |
| 124 | 147 |
| 125 # re2c is missing CLOSEVOP from one switch. | 148 # re2c is missing CLOSEVOP from one switch. |
| 126 if (is_posix) { | 149 if (is_posix) { |
| 127 cflags = [ "-Wno-switch" ] | 150 cflags = [ "-Wno-switch" ] |
| 128 } else if (is_win) { | 151 } else if (is_win) { |
| 129 cflags = [ "/wd4267" ] # size_t to int conversion. | 152 cflags = [ "/wd4267" ] # size_t to int conversion. |
| 130 } | 153 } |
| 131 } | 154 } |
| 132 | 155 |
| 133 executable("yasm") { | 156 executable("yasm") { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 "$target_gen_dir/x86regtmod.c", | 226 "$target_gen_dir/x86regtmod.c", |
| 204 | 227 |
| 205 # Files generated by compile_re2c | 228 # Files generated by compile_re2c |
| 206 "$target_gen_dir/gas-token.c", | 229 "$target_gen_dir/gas-token.c", |
| 207 "$target_gen_dir/nasm-token.c", | 230 "$target_gen_dir/nasm-token.c", |
| 208 | 231 |
| 209 # File generated by compile_re2c_lc3b | 232 # File generated by compile_re2c_lc3b |
| 210 "$target_gen_dir/lc3bid.c", | 233 "$target_gen_dir/lc3bid.c", |
| 211 | 234 |
| 212 # File generated by generate_module | 235 # File generated by generate_module |
| 213 "$target_gen_dir/module.c" | 236 "$target_gen_dir/module.c", |
| 214 ] | 237 ] |
| 215 | 238 |
| 216 configs -= [ "//build/config/compiler:chromium_code" ] | 239 configs -= [ "//build/config/compiler:chromium_code" ] |
| 217 configs += [ ":yasm_config", | 240 configs += [ |
| 218 "//build/config/compiler:no_chromium_code" ] | 241 ":yasm_config", |
| 242 "//build/config/compiler:no_chromium_code", |
| 243 ] |
| 219 | 244 |
| 220 # Yasm generates a bunch of .c files which its source file #include. | 245 # Yasm generates a bunch of .c files which its source file #include. |
| 221 # Add the |target_gen_dir| into the include path so it can find them. | 246 # Add the |target_gen_dir| into the include path so it can find them. |
| 222 # Ideally, these generated .c files would be placed into a separate | 247 # Ideally, these generated .c files would be placed into a separate |
| 223 # directory, but the gen_x86_insn.py script does not make this easy. | 248 # directory, but the gen_x86_insn.py script does not make this easy. |
| 224 include_dirs = [ yasm_gen_include_dir ] | 249 include_dirs = [ yasm_gen_include_dir ] |
| 225 | 250 |
| 226 if (is_win) { | 251 if (is_win) { |
| 227 cflags = [ "/wd4267" ] # size_t to int conversion. | 252 cflags = [ "/wd4267" ] # size_t to int conversion. |
| 228 } else { | 253 } else { |
| 229 cflags = [ "-ansi", "-pedantic" ] | 254 cflags = [ |
| 255 "-ansi", |
| 256 "-pedantic", |
| 257 ] |
| 230 if (is_clang) { | 258 if (is_clang) { |
| 231 cflags += [ "-Wno-incompatible-pointer-types" ] | 259 cflags += [ "-Wno-incompatible-pointer-types" ] |
| 232 } | 260 } |
| 233 } | 261 } |
| 234 | 262 |
| 235 # TODO(ajwong): This should take most of the generated output as | 263 # TODO(ajwong): This should take most of the generated output as |
| 236 # inputs. | 264 # inputs. |
| 237 deps = [ | 265 deps = [ |
| 238 ":compile_gperf", | 266 ":compile_gperf", |
| 239 ":compile_gperf_for_include", | 267 ":compile_gperf_for_include", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 256 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", | 284 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", |
| 257 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", | 285 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", |
| 258 ] | 286 ] |
| 259 | 287 |
| 260 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] | 288 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] |
| 261 args = [ | 289 args = [ |
| 262 "{{source}}", | 290 "{{source}}", |
| 263 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", | 291 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", |
| 264 ] | 292 ] |
| 265 deps = [ | 293 deps = [ |
| 266 ":generate_x86_insn" | 294 ":generate_x86_insn", |
| 267 ] | 295 ] |
| 268 } | 296 } |
| 269 | 297 |
| 270 # This differs from |compile_gperf| in where it places it output files. | 298 # This differs from |compile_gperf| in where it places it output files. |
| 271 compiled_action_foreach("compile_gperf_for_include") { | 299 compiled_action_foreach("compile_gperf_for_include") { |
| 272 tool = ":genperf" | 300 tool = ":genperf" |
| 273 sources = [ | 301 sources = [ |
| 274 # Make sure the generated gperf files in $target_gen_dir are synced with | 302 # Make sure the generated gperf files in $target_gen_dir are synced with |
| 275 # the outputs for the related generate_*_insn actions in the | 303 # the outputs for the related generate_*_insn actions in the |
| 276 # generate_files target below. | 304 # generate_files target below. |
| 277 # | 305 # |
| 278 # The output for these two are #included by | 306 # The output for these two are #included by |
| 279 # source/patched-yasm/modules/arch/x86/x86id.c | 307 # source/patched-yasm/modules/arch/x86/x86id.c |
| 280 "$yasm_gen_include_dir/x86insn_gas.gperf", | 308 "$yasm_gen_include_dir/x86insn_gas.gperf", |
| 281 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 309 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
| 282 ] | 310 ] |
| 283 | 311 |
| 284 outputs = [ "$yasm_gen_include_dir/{{source_name_part}}.c" ] | 312 outputs = [ "$yasm_gen_include_dir/{{source_name_part}}.c" ] |
| 285 args = [ | 313 args = [ |
| 286 "{{source}}", | 314 "{{source}}", |
| 287 rebase_path(yasm_gen_include_dir, root_build_dir) + | 315 rebase_path(yasm_gen_include_dir, root_build_dir) + |
| 288 "/{{source_name_part}}.c", | 316 "/{{source_name_part}}.c", |
| 289 ] | 317 ] |
| 290 deps = [ | 318 deps = [ |
| 291 ":generate_x86_insn" | 319 ":generate_x86_insn", |
| 292 ] | 320 ] |
| 293 } | 321 } |
| 294 | 322 |
| 295 template("compile_macro") { | 323 template("compile_macro") { |
| 296 compiled_action(target_name) { | 324 compiled_action(target_name) { |
| 297 tool = ":genmacro" | 325 tool = ":genmacro" |
| 326 |
| 298 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. | 327 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. |
| 299 inputs = invoker.sources | 328 inputs = invoker.sources |
| 300 outputs = invoker.outputs | 329 outputs = invoker.outputs |
| 301 args = [ | 330 args = [ |
| 302 rebase_path(outputs[0], root_build_dir), | 331 rebase_path(outputs[0], root_build_dir), |
| 303 invoker.macro_varname, | 332 invoker.macro_varname, |
| 304 rebase_path(inputs[0], root_build_dir), | 333 rebase_path(inputs[0], root_build_dir), |
| 305 ] | 334 ] |
| 306 if (defined(invoker.deps)) { | 335 if (defined(invoker.deps)) { |
| 307 deps = invoker.deps | 336 deps = invoker.deps |
| 308 } | 337 } |
| 309 } | 338 } |
| 310 } | 339 } |
| 311 | 340 |
| 312 compile_macro("compile_nasm_macros") { | 341 compile_macro("compile_nasm_macros") { |
| 313 # Output #included by | 342 # Output #included by |
| 314 # source/patched-yasm/modules/preprocs/nasm/nasm-parser.c | 343 # source/patched-yasm/modules/preprocs/nasm/nasm-parser.c |
| 315 sources = [ "source/patched-yasm/modules/parsers/nasm/nasm-std.mac" ] | 344 sources = [ |
| 345 "source/patched-yasm/modules/parsers/nasm/nasm-std.mac", |
| 346 ] |
| 316 outputs = [ "$yasm_gen_include_dir/nasm-macros.c" ] | 347 outputs = [ "$yasm_gen_include_dir/nasm-macros.c" ] |
| 317 macro_varname = "nasm_standard_mac" | 348 macro_varname = "nasm_standard_mac" |
| 318 } | 349 } |
| 319 | 350 |
| 320 compile_macro("compile_nasm_version") { | 351 compile_macro("compile_nasm_version") { |
| 321 # Output #included by | 352 # Output #included by |
| 322 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c | 353 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c |
| 323 sources = [ "$target_gen_dir/$version_file" ] | 354 sources = [ |
| 355 "$target_gen_dir/$version_file", |
| 356 ] |
| 324 outputs = [ "$yasm_gen_include_dir/nasm-version.c" ] | 357 outputs = [ "$yasm_gen_include_dir/nasm-version.c" ] |
| 325 macro_varname = "nasm_version_mac" | 358 macro_varname = "nasm_version_mac" |
| 326 deps = [ ":generate_version" ] | 359 deps = [ |
| 360 ":generate_version", |
| 361 ] |
| 327 } | 362 } |
| 328 | 363 |
| 329 compile_macro("compile_win64_gas") { | 364 compile_macro("compile_win64_gas") { |
| 330 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. | 365 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. |
| 331 sources = [ "source/patched-yasm/modules/objfmts/coff/win64-gas.mac" ] | 366 sources = [ |
| 367 "source/patched-yasm/modules/objfmts/coff/win64-gas.mac", |
| 368 ] |
| 332 outputs = [ "$yasm_gen_include_dir/win64-gas.c" ] | 369 outputs = [ "$yasm_gen_include_dir/win64-gas.c" ] |
| 333 macro_varname = "win64_gas_stdmac" | 370 macro_varname = "win64_gas_stdmac" |
| 334 } | 371 } |
| 335 | 372 |
| 336 compile_macro("compile_win64_nasm") { | 373 compile_macro("compile_win64_nasm") { |
| 337 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. | 374 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. |
| 338 sources = [ "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac" ] | 375 sources = [ |
| 376 "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac", |
| 377 ] |
| 339 outputs = [ "$yasm_gen_include_dir/win64-nasm.c" ] | 378 outputs = [ "$yasm_gen_include_dir/win64-nasm.c" ] |
| 340 macro_varname = "win64_nasm_stdmac" | 379 macro_varname = "win64_nasm_stdmac" |
| 341 } | 380 } |
| 342 | 381 |
| 343 compiled_action_foreach("compile_re2c") { | 382 compiled_action_foreach("compile_re2c") { |
| 344 tool = ":re2c" | 383 tool = ":re2c" |
| 345 sources = [ | 384 sources = [ |
| 346 "source/patched-yasm/modules/parsers/gas/gas-token.re", | 385 "source/patched-yasm/modules/parsers/gas/gas-token.re", |
| 347 "source/patched-yasm/modules/parsers/nasm/nasm-token.re", | 386 "source/patched-yasm/modules/parsers/nasm/nasm-token.re", |
| 348 ] | 387 ] |
| 349 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] | 388 outputs = [ "$target_gen_dir/{{source_name_part}}.c" ] |
| 350 args = [ | 389 args = [ |
| 351 "-b", | 390 "-b", |
| 352 "-o", | 391 "-o", |
| 353 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", | 392 rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c", |
| 354 "{{source}}", | 393 "{{source}}", |
| 355 ] | 394 ] |
| 356 } | 395 } |
| 357 | 396 |
| 358 # This call doesn't fit into the re2c template above. | 397 # This call doesn't fit into the re2c template above. |
| 359 compiled_action("compile_re2c_lc3b") { | 398 compiled_action("compile_re2c_lc3b") { |
| 360 tool = ":re2c" | 399 tool = ":re2c" |
| 361 inputs = [ "source/patched-yasm/modules/arch/lc3b/lc3bid.re" ] | 400 inputs = [ |
| 401 "source/patched-yasm/modules/arch/lc3b/lc3bid.re", |
| 402 ] |
| 362 outputs = [ "$target_gen_dir/lc3bid.c" ] | 403 outputs = [ "$target_gen_dir/lc3bid.c" ] |
| 363 args = [ | 404 args = [ |
| 364 "-s", | 405 "-s", |
| 365 "-o", | 406 "-o", |
| 366 rebase_path(outputs[0], root_build_dir), | 407 rebase_path(outputs[0], root_build_dir), |
| 367 rebase_path(inputs[0], root_build_dir), | 408 rebase_path(inputs[0], root_build_dir), |
| 368 ] | 409 ] |
| 369 } | 410 } |
| 370 | 411 |
| 371 compiled_action("generate_license") { | 412 compiled_action("generate_license") { |
| 372 tool = ":genstring" | 413 tool = ":genstring" |
| 414 |
| 373 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. | 415 # Output #included by source/patched-yasm/frontends/yasm/yasm.c. |
| 374 inputs = [ "source/patched-yasm/COPYING" ] | 416 inputs = [ |
| 417 "source/patched-yasm/COPYING", |
| 418 ] |
| 375 outputs = [ "$yasm_gen_include_dir/license.c" ] | 419 outputs = [ "$yasm_gen_include_dir/license.c" ] |
| 376 args = [ | 420 args = [ |
| 377 "license_msg", | 421 "license_msg", |
| 378 rebase_path(outputs[0], root_build_dir), | 422 rebase_path(outputs[0], root_build_dir), |
| 379 rebase_path(inputs[0], root_build_dir), | 423 rebase_path(inputs[0], root_build_dir), |
| 380 ] | 424 ] |
| 381 } | 425 } |
| 382 | 426 |
| 383 compiled_action("generate_module") { | 427 compiled_action("generate_module") { |
| 384 tool = ":genmodule" | 428 tool = ":genmodule" |
| 385 inputs = [ | 429 inputs = [ |
| 386 "source/patched-yasm/libyasm/module.in", | 430 "source/patched-yasm/libyasm/module.in", |
| 387 config_makefile, | 431 config_makefile, |
| 388 ] | 432 ] |
| 389 outputs = [ "$target_gen_dir/module.c" ] | 433 outputs = [ "$target_gen_dir/module.c" ] |
| 390 args = [ | 434 args = [ |
| 391 rebase_path(inputs[0], root_build_dir), | 435 rebase_path(inputs[0], root_build_dir), |
| 392 rebase_path(config_makefile, root_build_dir), | 436 rebase_path(config_makefile, root_build_dir), |
| 393 rebase_path(outputs[0], root_build_dir), | 437 rebase_path(outputs[0], root_build_dir), |
| 394 ] | 438 ] |
| 395 } | 439 } |
| 396 | 440 |
| 397 compiled_action("generate_version") { | 441 compiled_action("generate_version") { |
| 398 tool = ":genversion" | 442 tool = ":genversion" |
| 399 outputs = [ "$target_gen_dir/$version_file" ] | 443 outputs = [ "$target_gen_dir/$version_file" ] |
| 400 args = [ | 444 args = [ rebase_path(outputs[0], root_build_dir) ] |
| 401 rebase_path(outputs[0], | |
| 402 root_build_dir) | |
| 403 ] | |
| 404 } | 445 } |
| 405 | 446 |
| 406 action("generate_x86_insn") { | 447 action("generate_x86_insn") { |
| 407 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" | 448 script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py" |
| 449 |
| 408 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 450 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
| 409 outputs = [ | 451 outputs = [ |
| 410 "$yasm_gen_include_dir/x86insns.c", | 452 "$yasm_gen_include_dir/x86insns.c", |
| 411 "$yasm_gen_include_dir/x86insn_gas.gperf", | 453 "$yasm_gen_include_dir/x86insn_gas.gperf", |
| 412 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 454 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
| 413 ] | 455 ] |
| 414 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 456 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
| 415 } | 457 } |
| 416 } | 458 } |
| OLD | NEW |