diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/android/forwarder2/BUILD.gn | 8 | ||||
-rw-r--r-- | tools/android/md5sum/BUILD.gn | 10 | ||||
-rw-r--r-- | tools/generate_library_loader/generate_library_loader.gni | 32 | ||||
-rw-r--r-- | tools/gn/BUILD.gn | 16 | ||||
-rw-r--r-- | tools/gn/example/BUILD.gn | 6 | ||||
-rw-r--r-- | tools/gn/example/build/BUILDCONFIG.gn | 5 | ||||
-rw-r--r-- | tools/gn/example/build/toolchain/BUILD.gn | 6 | ||||
-rw-r--r-- | tools/json_schema_compiler/BUILD.gn | 7 | ||||
-rw-r--r-- | tools/json_to_struct/json_to_struct.gni | 4 | ||||
-rw-r--r-- | tools/relocation_packer/BUILD.gn | 32 | ||||
-rw-r--r-- | tools/relocation_packer/config.gni | 7 | ||||
-rw-r--r-- | tools/xdisplaycheck/BUILD.gn | 8 |
12 files changed, 93 insertions, 48 deletions
diff --git a/tools/android/forwarder2/BUILD.gn b/tools/android/forwarder2/BUILD.gn index 87e6abf..acbd617 100644 --- a/tools/android/forwarder2/BUILD.gn +++ b/tools/android/forwarder2/BUILD.gn @@ -88,7 +88,11 @@ if (current_toolchain != default_toolchain) { # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2 copy("host_forwarder_copy") { - sources = ["$root_out_dir/host_forwarder"] - outputs = ["$root_build_dir/host_forwarder"] + sources = [ + "$root_out_dir/host_forwarder", + ] + outputs = [ + "$root_build_dir/host_forwarder", + ] } } diff --git a/tools/android/md5sum/BUILD.gn b/tools/android/md5sum/BUILD.gn index 5f91a88..9b458c7 100644 --- a/tools/android/md5sum/BUILD.gn +++ b/tools/android/md5sum/BUILD.gn @@ -10,6 +10,7 @@ group("md5sum") { ":md5sum_prepare_dist($default_toolchain)", ":md5sum_copy_host($host_toolchain)", ] + # TODO(cjhopman): Remove once group datadeps are fixed. deps = datadeps } @@ -17,10 +18,10 @@ group("md5sum") { # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host) executable("md5sum_bin") { sources = [ - "md5sum.cc" + "md5sum.cc", ] deps = [ - "//base" + "//base", ] # TODO(GYP) @@ -43,11 +44,10 @@ if (current_toolchain == default_toolchain) { # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host copy("md5sum_copy_host") { sources = [ - "$root_out_dir/md5sum_bin" + "$root_out_dir/md5sum_bin", ] outputs = [ - "$root_build_dir/md5sum_bin_host" + "$root_build_dir/md5sum_bin_host", ] } } - diff --git a/tools/generate_library_loader/generate_library_loader.gni b/tools/generate_library_loader/generate_library_loader.gni index debeddd..2b6874a 100644 --- a/tools/generate_library_loader/generate_library_loader.gni +++ b/tools/generate_library_loader/generate_library_loader.gni @@ -24,13 +24,21 @@ template("generate_library_loader") { visibility = invoker.visibility } - outputs = [ output_h, output_cc ] + outputs = [ + output_h, + output_cc, + ] args = [ - "--name", invoker.name, - "--output-h", rebase_path(output_h), - "--output-cc", rebase_path(output_cc), - "--header", invoker.header, + "--name", + invoker.name, + "--output-h", + rebase_path(output_h), + "--output-cc", + rebase_path(output_cc), + "--header", + invoker.header, + # Note GYP build exposes a per-target variable to control this, which, if # manually set to true, will disable dlopen(). Its not clear this is # needed, so here we just leave off. If this can be done globally, we can @@ -39,7 +47,10 @@ template("generate_library_loader") { "--link-directly=0", ] if (defined(invoker.bundled_header)) { - args += [ "--bundled-header", invoker.bundled_header ] + args += [ + "--bundled-header", + invoker.bundled_header, + ] } args += invoker.functions } @@ -48,7 +59,12 @@ template("generate_library_loader") { if (defined(invoker.config)) { public_configs = [ invoker.config ] } - sources = [ output_h, output_cc ] - deps = [ ":${target_name}_loader" ] + sources = [ + output_h, + output_cc, + ] + deps = [ + ":${target_name}_loader", + ] } } diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn index 143641b..71fabe9 100644 --- a/tools/gn/BUILD.gn +++ b/tools/gn/BUILD.gn @@ -188,10 +188,14 @@ action("last_commit_position") { script = "last_commit_position.py" # This dependency forces a re-run when the code is synced. - inputs = [ "//build/util/LASTCHANGE" ] + inputs = [ + "//build/util/LASTCHANGE", + ] outfile = "$target_gen_dir/last_commit_position.h" - outputs = [ outfile ] + outputs = [ + outfile, + ] args = [ rebase_path("//", root_build_dir), @@ -271,6 +275,10 @@ test("gn_unittests") { } executable("generate_test_gn_data") { - sources = [ "generate_test_gn_data.cc" ] - deps = [ "//base" ] + sources = [ + "generate_test_gn_data.cc", + ] + deps = [ + "//base", + ] } diff --git a/tools/gn/example/BUILD.gn b/tools/gn/example/BUILD.gn index 2cb0136..58af952 100644 --- a/tools/gn/example/BUILD.gn +++ b/tools/gn/example/BUILD.gn @@ -3,7 +3,9 @@ # found in the LICENSE file. executable("hello") { - sources = [ "hello.cc" ] + sources = [ + "hello.cc", + ] deps = [ ":hello_static", @@ -14,7 +16,7 @@ executable("hello") { shared_library("hello_shared") { sources = [ "hello_shared.cc", - "hello_shared.h" + "hello_shared.h", ] defines = [ "HELLO_SHARED_IMPLEMENTATION" ] diff --git a/tools/gn/example/build/BUILDCONFIG.gn b/tools/gn/example/build/BUILDCONFIG.gn index f36567d..d107908 100644 --- a/tools/gn/example/build/BUILDCONFIG.gn +++ b/tools/gn/example/build/BUILDCONFIG.gn @@ -3,13 +3,12 @@ # found in the LICENSE file. # All binary targets will get this list of configs by default. -_shared_binary_target_configs = [ - "//build:compiler_defaults", -] +_shared_binary_target_configs = [ "//build:compiler_defaults" ] # Apply that default list to the binary target types. set_defaults("executable") { configs = _shared_binary_target_configs + # Executables get this additional configuration. configs += [ "//build:executable_ldconfig" ] } diff --git a/tools/gn/example/build/toolchain/BUILD.gn b/tools/gn/example/build/toolchain/BUILD.gn index 27a1e31..77e33fe 100644 --- a/tools/gn/example/build/toolchain/BUILD.gn +++ b/tools/gn/example/build/toolchain/BUILD.gn @@ -29,7 +29,7 @@ toolchain("gcc") { description = "AR {{target_output_name}}{{output_extension}}" rspfile_content = "{{inputs}}" outputs = [ - "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" + "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", ] default_output_extension = ".a" output_prefix = "lib" @@ -63,7 +63,9 @@ toolchain("gcc") { command = "g++ {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}}" description = "LINK $outfile" rspfile_content = "{{inputs}}" - outputs = [ outfile ] + outputs = [ + outfile, + ] } tool("stamp") { diff --git a/tools/json_schema_compiler/BUILD.gn b/tools/json_schema_compiler/BUILD.gn index 2d7c183..f92f937 100644 --- a/tools/json_schema_compiler/BUILD.gn +++ b/tools/json_schema_compiler/BUILD.gn @@ -6,8 +6,9 @@ source_set("generated_api_util") { sources = [ "util.cc", - "util.h" + "util.h", + ] + deps = [ + "//base", ] - deps = [ "//base" ] } - diff --git a/tools/json_to_struct/json_to_struct.gni b/tools/json_to_struct/json_to_struct.gni index 0ef5bd8..8143922 100644 --- a/tools/json_to_struct/json_to_struct.gni +++ b/tools/json_to_struct/json_to_struct.gni @@ -57,6 +57,8 @@ template("json_to_struct") { sources = get_target_outputs(":$action_name") - deps = [ ":$action_name" ] + deps = [ + ":$action_name", + ] } } diff --git a/tools/relocation_packer/BUILD.gn b/tools/relocation_packer/BUILD.gn index d841277..cbbc6fd 100644 --- a/tools/relocation_packer/BUILD.gn +++ b/tools/relocation_packer/BUILD.gn @@ -16,7 +16,9 @@ if (current_toolchain == host_toolchain) { # GYP: //tools/relocation_packer/relocation_packer.gyp:lib_relocation_packer source_set("lib_relocation_packer") { defines = [ target_define ] - deps = [ "//third_party/elfutils:libelf" ] + deps = [ + "//third_party/elfutils:libelf", + ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] sources = [ @@ -37,7 +39,9 @@ if (current_toolchain == host_toolchain) { ":lib_relocation_packer", "//third_party/elfutils:libelf", ] - sources = [ "src/main.cc" ] + sources = [ + "src/main.cc", + ] } # GYP: //tools/relocation_packer/relocation_packer.gyp:relocation_packer_unittests @@ -61,7 +65,7 @@ if (current_toolchain == host_toolchain) { ] defines = [ target_define, - "INTERMEDIATE_DIR=\"$rebased_test_data\"" + "INTERMEDIATE_DIR=\"$rebased_test_data\"", ] include_dirs = [ "//" ] deps = [ @@ -84,9 +88,12 @@ if (current_toolchain == default_toolchain && # GYP: //tools/relocation_packer/relocation_packer.gyp:relocation_packer_test_data shared_library("relocation_packer_test_data") { - cflags = [ "-O0", "-g0" ] + cflags = [ + "-O0", + "-g0", + ] sources = [ - "test_data/elf_file_unittest_relocs.cc" + "test_data/elf_file_unittest_relocs.cc", ] } @@ -124,12 +131,17 @@ if (current_toolchain == default_toolchain && ] args = [ - "--android-pack-relocations", rebase_path(relocation_packer_exe, root_build_dir), - "--android-objcopy", rebase_path(android_objcopy, root_build_dir), + "--android-pack-relocations", + rebase_path(relocation_packer_exe, root_build_dir), + "--android-objcopy", + rebase_path(android_objcopy, root_build_dir), "--added-section=$added_section", - "--test-file", rebase_path(test_file, root_build_dir), - "--packed-output", rebase_path(packed_output, root_build_dir), - "--unpacked-output", rebase_path(unpacked_output, root_build_dir), + "--test-file", + rebase_path(test_file, root_build_dir), + "--packed-output", + rebase_path(packed_output, root_build_dir), + "--unpacked-output", + rebase_path(unpacked_output, root_build_dir), ] } } diff --git a/tools/relocation_packer/config.gni b/tools/relocation_packer/config.gni index fec2752..90e3979 100644 --- a/tools/relocation_packer/config.gni +++ b/tools/relocation_packer/config.gni @@ -2,13 +2,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -relocation_packing_supported = ( - (target_arch == "arm") || (target_arch == "arm64")) +relocation_packing_supported = target_arch == "arm" || target_arch == "arm64" if (relocation_packing_supported) { relocation_packer_target = "//tools/relocation_packer($host_toolchain)" - relocation_packer_dir = get_label_info( - "$relocation_packer_target", "root_out_dir") + relocation_packer_dir = + get_label_info("$relocation_packer_target", "root_out_dir") relocation_packer_exe = "${relocation_packer_dir}/relocation_packer" if (target_arch == "arm") { diff --git a/tools/xdisplaycheck/BUILD.gn b/tools/xdisplaycheck/BUILD.gn index 23a52ae..779e163 100644 --- a/tools/xdisplaycheck/BUILD.gn +++ b/tools/xdisplaycheck/BUILD.gn @@ -7,9 +7,9 @@ executable("xdisplaycheck") { "xdisplaycheck.cc", ] - configs += [ - "//build/config/linux:x11" - ] + configs += [ "//build/config/linux:x11" ] - deps = [ "//build/config/sanitizers:deps" ] + deps = [ + "//build/config/sanitizers:deps", + ] } |