| Index: third_party/yasm/BUILD.gn
|
| diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn
|
| index 700e7452bf8dbb625be752951cb9d1c92f5b665e..3b2b88454fa0ebd961d5134dd55695f60301cca9 100644
|
| --- a/third_party/yasm/BUILD.gn
|
| +++ b/third_party/yasm/BUILD.gn
|
| @@ -28,7 +28,6 @@
|
| # turn intermediate files into .c files.
|
|
|
| if (current_toolchain == host_toolchain) {
|
| -
|
| # Various files referenced by multiple targets.
|
| yasm_gen_include_dir = "$target_gen_dir/include"
|
| yasm_os = os
|
| @@ -52,17 +51,25 @@ if (current_toolchain == host_toolchain) {
|
| }
|
|
|
| executable("genmacro") {
|
| - sources = [ "source/patched-yasm/tools/genmacro/genmacro.c" ]
|
| + sources = [
|
| + "source/patched-yasm/tools/genmacro/genmacro.c",
|
| + ]
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
| }
|
|
|
| executable("genmodule") {
|
| - sources = [ "source/patched-yasm/libyasm/genmodule.c" ]
|
| + sources = [
|
| + "source/patched-yasm/libyasm/genmodule.c",
|
| + ]
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
| }
|
|
|
| executable("genperf") {
|
| @@ -72,10 +79,14 @@ if (current_toolchain == host_toolchain) {
|
| ]
|
|
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
|
|
| - deps = [ ":yasm_utils" ]
|
| + deps = [
|
| + ":yasm_utils",
|
| + ]
|
| }
|
|
|
| # Used by both yasm and genperf binaries.
|
| @@ -87,40 +98,52 @@ if (current_toolchain == host_toolchain) {
|
| ]
|
|
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
| }
|
|
|
| executable("genstring") {
|
| - sources = [ "source/patched-yasm/genstring.c", ]
|
| + sources = [
|
| + "source/patched-yasm/genstring.c",
|
| + ]
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
| }
|
|
|
| executable("genversion") {
|
| - sources = [ "source/patched-yasm/modules/preprocs/nasm/genversion.c" ]
|
| + sources = [
|
| + "source/patched-yasm/modules/preprocs/nasm/genversion.c",
|
| + ]
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
| }
|
|
|
| executable("re2c") {
|
| sources = [
|
| - "source/patched-yasm/tools/re2c/main.c",
|
| - "source/patched-yasm/tools/re2c/code.c",
|
| - "source/patched-yasm/tools/re2c/dfa.c",
|
| - "source/patched-yasm/tools/re2c/parser.c",
|
| - "source/patched-yasm/tools/re2c/actions.c",
|
| - "source/patched-yasm/tools/re2c/scanner.c",
|
| - "source/patched-yasm/tools/re2c/mbo_getopt.c",
|
| - "source/patched-yasm/tools/re2c/substr.c",
|
| - "source/patched-yasm/tools/re2c/translate.c",
|
| + "source/patched-yasm/tools/re2c/main.c",
|
| + "source/patched-yasm/tools/re2c/code.c",
|
| + "source/patched-yasm/tools/re2c/dfa.c",
|
| + "source/patched-yasm/tools/re2c/parser.c",
|
| + "source/patched-yasm/tools/re2c/actions.c",
|
| + "source/patched-yasm/tools/re2c/scanner.c",
|
| + "source/patched-yasm/tools/re2c/mbo_getopt.c",
|
| + "source/patched-yasm/tools/re2c/substr.c",
|
| + "source/patched-yasm/tools/re2c/translate.c",
|
| ]
|
|
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
|
|
| # re2c is missing CLOSEVOP from one switch.
|
| if (is_posix) {
|
| @@ -210,12 +233,14 @@ if (current_toolchain == host_toolchain) {
|
| "$target_gen_dir/lc3bid.c",
|
|
|
| # File generated by generate_module
|
| - "$target_gen_dir/module.c"
|
| + "$target_gen_dir/module.c",
|
| ]
|
|
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| - configs += [ ":yasm_config",
|
| - "//build/config/compiler:no_chromium_code" ]
|
| + configs += [
|
| + ":yasm_config",
|
| + "//build/config/compiler:no_chromium_code",
|
| + ]
|
|
|
| # Yasm generates a bunch of .c files which its source file #include.
|
| # Add the |target_gen_dir| into the include path so it can find them.
|
| @@ -226,7 +251,10 @@ if (current_toolchain == host_toolchain) {
|
| if (is_win) {
|
| cflags = [ "/wd4267" ] # size_t to int conversion.
|
| } else {
|
| - cflags = [ "-ansi", "-pedantic" ]
|
| + cflags = [
|
| + "-ansi",
|
| + "-pedantic",
|
| + ]
|
| if (is_clang) {
|
| cflags += [ "-Wno-incompatible-pointer-types" ]
|
| }
|
| @@ -263,7 +291,7 @@ if (current_toolchain == host_toolchain) {
|
| rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.c",
|
| ]
|
| deps = [
|
| - ":generate_x86_insn"
|
| + ":generate_x86_insn",
|
| ]
|
| }
|
|
|
| @@ -288,13 +316,14 @@ if (current_toolchain == host_toolchain) {
|
| "/{{source_name_part}}.c",
|
| ]
|
| deps = [
|
| - ":generate_x86_insn"
|
| + ":generate_x86_insn",
|
| ]
|
| }
|
|
|
| template("compile_macro") {
|
| compiled_action(target_name) {
|
| tool = ":genmacro"
|
| +
|
| # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
|
| inputs = invoker.sources
|
| outputs = invoker.outputs
|
| @@ -312,7 +341,9 @@ if (current_toolchain == host_toolchain) {
|
| compile_macro("compile_nasm_macros") {
|
| # Output #included by
|
| # source/patched-yasm/modules/preprocs/nasm/nasm-parser.c
|
| - sources = [ "source/patched-yasm/modules/parsers/nasm/nasm-std.mac" ]
|
| + sources = [
|
| + "source/patched-yasm/modules/parsers/nasm/nasm-std.mac",
|
| + ]
|
| outputs = [ "$yasm_gen_include_dir/nasm-macros.c" ]
|
| macro_varname = "nasm_standard_mac"
|
| }
|
| @@ -320,22 +351,30 @@ if (current_toolchain == host_toolchain) {
|
| compile_macro("compile_nasm_version") {
|
| # Output #included by
|
| # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c
|
| - sources = [ "$target_gen_dir/$version_file" ]
|
| + sources = [
|
| + "$target_gen_dir/$version_file",
|
| + ]
|
| outputs = [ "$yasm_gen_include_dir/nasm-version.c" ]
|
| macro_varname = "nasm_version_mac"
|
| - deps = [ ":generate_version" ]
|
| + deps = [
|
| + ":generate_version",
|
| + ]
|
| }
|
|
|
| compile_macro("compile_win64_gas") {
|
| # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
|
| - sources = [ "source/patched-yasm/modules/objfmts/coff/win64-gas.mac" ]
|
| + sources = [
|
| + "source/patched-yasm/modules/objfmts/coff/win64-gas.mac",
|
| + ]
|
| outputs = [ "$yasm_gen_include_dir/win64-gas.c" ]
|
| macro_varname = "win64_gas_stdmac"
|
| }
|
|
|
| compile_macro("compile_win64_nasm") {
|
| # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
|
| - sources = [ "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac" ]
|
| + sources = [
|
| + "source/patched-yasm/modules/objfmts/coff/win64-nasm.mac",
|
| + ]
|
| outputs = [ "$yasm_gen_include_dir/win64-nasm.c" ]
|
| macro_varname = "win64_nasm_stdmac"
|
| }
|
| @@ -358,7 +397,9 @@ if (current_toolchain == host_toolchain) {
|
| # This call doesn't fit into the re2c template above.
|
| compiled_action("compile_re2c_lc3b") {
|
| tool = ":re2c"
|
| - inputs = [ "source/patched-yasm/modules/arch/lc3b/lc3bid.re" ]
|
| + inputs = [
|
| + "source/patched-yasm/modules/arch/lc3b/lc3bid.re",
|
| + ]
|
| outputs = [ "$target_gen_dir/lc3bid.c" ]
|
| args = [
|
| "-s",
|
| @@ -370,8 +411,11 @@ if (current_toolchain == host_toolchain) {
|
|
|
| compiled_action("generate_license") {
|
| tool = ":genstring"
|
| +
|
| # Output #included by source/patched-yasm/frontends/yasm/yasm.c.
|
| - inputs = [ "source/patched-yasm/COPYING" ]
|
| + inputs = [
|
| + "source/patched-yasm/COPYING",
|
| + ]
|
| outputs = [ "$yasm_gen_include_dir/license.c" ]
|
| args = [
|
| "license_msg",
|
| @@ -397,14 +441,12 @@ if (current_toolchain == host_toolchain) {
|
| compiled_action("generate_version") {
|
| tool = ":genversion"
|
| outputs = [ "$target_gen_dir/$version_file" ]
|
| - args = [
|
| - rebase_path(outputs[0],
|
| - root_build_dir)
|
| - ]
|
| + args = [ rebase_path(outputs[0], root_build_dir) ]
|
| }
|
|
|
| action("generate_x86_insn") {
|
| script = "source/patched-yasm/modules/arch/x86/gen_x86_insn.py"
|
| +
|
| # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c
|
| outputs = [
|
| "$yasm_gen_include_dir/x86insns.c",
|
|
|