diff options
author | scottmg <scottmg@chromium.org> | 2014-12-03 15:27:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-03 23:27:41 +0000 |
commit | 34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb (patch) | |
tree | dc6a3e4de8e3093074390b933e9d4cb0e79070f5 /build | |
parent | e00b5de3d64b4ea58797b13f42039956a5b3ddec (diff) | |
download | chromium_src-34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb.zip chromium_src-34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb.tar.gz chromium_src-34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb.tar.bz2 |
gn format // (the rest, except mojo)
Excluded mojo because I think that needs to happen on the other side.
At gn --version = 306668 for which roll is in CQ.
R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/774353003
Cr-Commit-Position: refs/heads/master@{#306708}
Diffstat (limited to 'build')
-rw-r--r-- | build/config/android/config.gni | 18 | ||||
-rw-r--r-- | build/config/android/internal_rules.gni | 16 | ||||
-rw-r--r-- | build/config/android/rules.gni | 7 | ||||
-rw-r--r-- | build/go/rules.gni | 8 | ||||
-rw-r--r-- | build/secondary/third_party/android_tools/BUILD.gn | 6 | ||||
-rw-r--r-- | build/secondary/third_party/icu/BUILD.gn | 8 | ||||
-rw-r--r-- | build/secondary/tools/grit/BUILD.gn | 4 | ||||
-rw-r--r-- | build/secondary/tools/grit/repack.gni | 4 | ||||
-rw-r--r-- | build/toolchain/android/BUILD.gn | 3 | ||||
-rw-r--r-- | build/toolchain/gcc_toolchain.gni | 48 | ||||
-rw-r--r-- | build/toolchain/mac/BUILD.gn | 73 | ||||
-rw-r--r-- | build/toolchain/nacl/BUILD.gn | 12 | ||||
-rw-r--r-- | build/toolchain/win/BUILD.gn | 46 | ||||
-rw-r--r-- | build/util/BUILD.gn | 4 |
14 files changed, 129 insertions, 128 deletions
diff --git a/build/config/android/config.gni b/build/config/android/config.gni index e2bd165..82405dd 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -95,12 +95,9 @@ if (is_android) { # Toolchain root directory for each build. The actual binaries are inside # a "bin" directory inside of these. _android_toolchain_version = "4.9" - x86_android_toolchain_root = - "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" - arm_android_toolchain_root = - "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" - mips_android_toolchain_root = - "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" + x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" + arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" + mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}" # Location of libgcc. This is only needed for the current GN toolchain, so we # only need to define the current one, rather than one for every platform @@ -109,20 +106,17 @@ if (is_android) { android_prebuilt_arch = "android-x86" _binary_prefix = "i686-linux-android" android_toolchain_root = "$x86_android_toolchain_root" - android_libgcc_file = - "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_version}/libgcc.a" + android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_version}/libgcc.a" } else if (cpu_arch == "arm") { android_prebuilt_arch = "android-arm" _binary_prefix = "arm-linux-androideabi" android_toolchain_root = "$arm_android_toolchain_root" - android_libgcc_file = - "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchain_version}/libgcc.a" + android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchain_version}/libgcc.a" } else if (cpu_arch == "mipsel") { android_prebuilt_arch = "android-mips" _binary_prefix = "mipsel-linux-android" android_toolchain_root = "$mips_android_toolchain_root" - android_libgcc_file = - "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a" + android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a" } else { assert(false, "Need android libgcc support for your target arch.") } diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni index 41fd75f..ce6e428 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni @@ -333,7 +333,9 @@ template("process_java_prebuilt") { sources = [ _input_jar_path, ] - outputs = [ _output_jar_path ] + outputs = [ + _output_jar_path, + ] } } @@ -901,8 +903,12 @@ template("java_library_impl") { _final_deps += [ ":${_template_name}__standalone_dex" ] _rebased_build_config = rebase_path(_build_config, root_build_dir) dex("${_template_name}__standalone_dex") { - sources = [_jar_path] - inputs = [_build_config] + sources = [ + _jar_path, + ] + inputs = [ + _build_config, + ] output = invoker.standalone_dex_path dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" args = [ "--inputs=@FileArg($dex_arg_key)" ] @@ -1033,7 +1039,9 @@ template("copy_ex") { } depfile = "$target_gen_dir/$target_name.d" - outputs = [ depfile ] + outputs = [ + depfile, + ] args = [ "--depfile", diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index d1342ac..5d0cb37 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni @@ -1312,7 +1312,9 @@ template("android_apk") { script = "//build/android/gyp/pack_arm_relocations.py" packed_libraries_dir = "$_native_libs_dir/$android_app_abi" depfile = "$target_gen_dir/$target_name.d" - outputs = [ depfile ] + outputs = [ + depfile, + ] inputs = [ _build_config, ] @@ -1440,8 +1442,7 @@ template("unittest_apk") { android_apk(target_name) { _apk_name = test_suite_name final_apk_path = "$root_build_dir/${_apk_name}_apk/${_apk_name}-debug.apk" - java_files = - [ "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java" ] + java_files = [ "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java" ] android_manifest = "//testing/android/java/AndroidManifest.xml" native_libs = [ unittests_binary ] deps = [ diff --git a/build/go/rules.gni b/build/go/rules.gni index d4b1f50..9f97854 100644 --- a/build/go/rules.gni +++ b/build/go/rules.gni @@ -39,7 +39,9 @@ template("go_test_binary") { ":$static_library_name", ] script = "//build/go/go.py" - outputs = [ "${target_out_dir}/${target_name}" ] + outputs = [ + "${target_out_dir}/${target_name}", + ] # Since go test does not permit specifying an output directory or output # binary name, we create a temporary build directory, and the python @@ -79,7 +81,9 @@ template("go_shared_library") { ":$static_library_name", ] script = "//build/go/go.py" - outputs = [ "${target_out_dir}/${target_name}" ] + outputs = [ + "${target_out_dir}/${target_name}", + ] # Since go test does not permit specifying an output directory or output # binary name, we create a temporary build directory, and the python diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn index 0df6545..fc1ecbf 100644 --- a/build/secondary/third_party/android_tools/BUILD.gn +++ b/build/secondary/third_party/android_tools/BUILD.gn @@ -44,8 +44,7 @@ android_java_prebuilt("android_support_v7_appcompat_java") { deps = [ ":android_support_v7_appcompat_resources", ] - jar_path = - "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar" + jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar" } android_resources("android_support_v7_mediarouter_resources") { @@ -63,6 +62,5 @@ android_java_prebuilt("android_support_v7_mediarouter_java") { ":android_support_v7_mediarouter_resources", ":android_support_v7_appcompat_java", ] - jar_path = - "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar" + jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar" } diff --git a/build/secondary/third_party/icu/BUILD.gn b/build/secondary/third_party/icu/BUILD.gn index b618673..8b64f70 100644 --- a/build/secondary/third_party/icu/BUILD.gn +++ b/build/secondary/third_party/icu/BUILD.gn @@ -481,7 +481,9 @@ if (icu_use_data_file) { ] } - outputs = [ "$root_out_dir/icudtl.dat" ] + outputs = [ + "$root_out_dir/icudtl.dat", + ] } } } else { @@ -491,7 +493,9 @@ if (icu_use_data_file) { sources = [ "windows/icudt.dll", ] - outputs = [ "$root_out_dir/icudt.dll" ] + outputs = [ + "$root_out_dir/icudt.dll", + ] } } else { source_set("icudata") { diff --git a/build/secondary/tools/grit/BUILD.gn b/build/secondary/tools/grit/BUILD.gn index dee3d06..660bf1b 100644 --- a/build/secondary/tools/grit/BUILD.gn +++ b/build/secondary/tools/grit/BUILD.gn @@ -15,7 +15,9 @@ action("grit_sources") { # Note that we can't call this "grit_sources.stamp" because that file is # implicitly created by GN for script actions. - outputs = [ "$target_out_dir/grit_sources.script.stamp" ] + outputs = [ + "$target_out_dir/grit_sources.script.stamp", + ] args = [ rebase_path("//tools/grit", root_build_dir), diff --git a/build/secondary/tools/grit/repack.gni b/build/secondary/tools/grit/repack.gni index cba1732..1030674 100644 --- a/build/secondary/tools/grit/repack.gni +++ b/build/secondary/tools/grit/repack.gni @@ -29,7 +29,9 @@ template("repack") { script = "//tools/grit/grit/format/repack.py" inputs = invoker.sources - outputs = [ invoker.output ] + outputs = [ + invoker.output, + ] args = [] if (defined(invoker.repack_options)) { diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn index e074333..d21ed27 100644 --- a/build/toolchain/android/BUILD.gn +++ b/build/toolchain/android/BUILD.gn @@ -65,8 +65,7 @@ template("android_gcc_toolchain") { mkdir_command = "mkdir -p lib.stripped" strip_command = "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" - replace_command = - "if ! cmp -s $temp_stripped_soname $stripped_soname; then mv $temp_stripped_soname $stripped_soname; fi" + replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then mv $temp_stripped_soname $stripped_soname; fi" postsolink = "$mkdir_command && $strip_command && $replace_command" solink_outputs = [ stripped_soname ] diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni index 4a4ef45..cec9b08 100644 --- a/build/toolchain/gcc_toolchain.gni +++ b/build/toolchain/gcc_toolchain.gni @@ -84,33 +84,33 @@ template("gcc_toolchain") { tool("cc") { depfile = "{{output}}.d" - command = - "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" + command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "CC {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("cxx") { depfile = "{{output}}.d" - command = - "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" + command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "CXX {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("asm") { # For GCC we can just use the C compiler to compile assembly. depfile = "{{output}}.d" - command = - "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" + command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "ASM {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("alink") { @@ -118,8 +118,9 @@ template("gcc_toolchain") { command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" description = "AR {{output}}" rspfile_content = "{{inputs}}" - outputs = - [ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" ] + outputs = [ + "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", + ] default_output_extension = ".a" output_prefix = "lib" } @@ -137,17 +138,14 @@ template("gcc_toolchain") { temporary_tocname = sofile + ".tmp" link_command = "$ld -shared {{ldflags}} -o $sofile -Wl,-soname=$soname @$rspfile" - toc_command = - "{ readelf -d $sofile | grep SONAME ; nm -gD -f p $soname | cut -f1-2 -d' '; } > $temporary_tocname" - replace_command = - "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" + toc_command = "{ readelf -d $sofile | grep SONAME ; nm -gD -f p $soname | cut -f1-2 -d' '; } > $temporary_tocname" + replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" command = "$link_command && $toc_command && $replace_command" if (defined(invoker.postsolink)) { command += " && " + invoker.postsolink } - rspfile_content = - "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" + rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" description = "SOLINK $sofile" @@ -179,14 +177,15 @@ template("gcc_toolchain") { tool("link") { outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" rspfile = "$outfile.rsp" - command = - "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" + command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" if (defined(invoker.postlink)) { command += " && " + invoker.postlink } description = "LINK $outfile" rspfile_content = "{{inputs}}" - outputs = [ outfile ] + outputs = [ + outfile, + ] if (defined(invoker.link_outputs)) { outputs += invoker.link_outputs } @@ -198,8 +197,7 @@ template("gcc_toolchain") { } tool("copy") { - command = - "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" + command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" description = "COPY {{source}} {{output}}" } diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index 052e76c..26ad865 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -57,61 +57,61 @@ template("mac_clang_toolchain") { tool("cc") { depfile = "{{output}}.d" - command = - "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" + command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "CC {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("cxx") { depfile = "{{output}}.d" - command = - "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" + command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "CXX {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("asm") { # For GCC we can just use the C compiler to compile assembly. depfile = "{{output}}.d" - command = - "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" + command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "ASM {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("objc") { depfile = "{{output}}.d" - command = - "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" + command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "OBJC {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("objcxx") { depfile = "{{output}}.d" - command = - "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}" + command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}" depsformat = "gcc" description = "OBJCXX {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", + ] } tool("alink") { - command = - "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -static -o {{output}} {{inputs}}" + command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -static -o {{output}} {{inputs}}" description = "LIBTOOL-STATIC {{output}}" - outputs = - [ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" ] + outputs = [ + "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", + ] default_output_extension = ".a" output_prefix = "lib" } @@ -131,17 +131,12 @@ template("mac_clang_toolchain") { tocname = dylib + ".TOC" temporary_tocname = dylib + ".tmp" - does_reexport_command = - "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB" - link_command = - "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" - replace_command = - "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname" - extract_toc_command = - "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }" + does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB" + link_command = "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" + replace_command = "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname" + extract_toc_command = "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }" - command = - "if $does_reexport_command ; then $link_command && $extract_toc_command > $tocname; else $link_command && $extract_toc_command > $temporary_tocname && $replace_command ; fi; fi" + command = "if $does_reexport_command ; then $link_command && $extract_toc_command > $tocname; else $link_command && $extract_toc_command > $temporary_tocname && $replace_command ; fi; fi" rspfile_content = "{{inputs_newline}}" @@ -172,11 +167,12 @@ template("mac_clang_toolchain") { tool("link") { outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" rspfile = "$outfile.rsp" - command = - "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}" + command = "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}" description = "LINK $outfile" rspfile_content = "{{inputs_newline}}" - outputs = [ outfile ] + outputs = [ + outfile, + ] } tool("stamp") { @@ -185,8 +181,7 @@ template("mac_clang_toolchain") { } tool("copy") { - command = - "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" + command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" description = "COPY {{source}} {{output}}" } diff --git a/build/toolchain/nacl/BUILD.gn b/build/toolchain/nacl/BUILD.gn index bea30e0..b923608 100644 --- a/build/toolchain/nacl/BUILD.gn +++ b/build/toolchain/nacl/BUILD.gn @@ -9,16 +9,14 @@ toolchain("x86_newlib") { ld = toolprefix + "g++" tool("cc") { - command = - "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out" + command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out" description = "CC(NaCl x86 Newlib) \$out" depfile = "\$out.d" depsformat = "gcc" } tool("cxx") { # cflags_pch_cc - command = - "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -c \$in -o \$out" + command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -c \$in -o \$out" description = "CXX(NaCl x86 Newlib) \$out" depfile = "\$out.d" depsformat = "gcc" @@ -28,16 +26,14 @@ toolchain("x86_newlib") { description = "AR(NaCl x86 Newlib) \$out" } tool("solink") { - command = - "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" + command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" description = "SOLINK(NaCl x86 Newlib) \$lib" #pool = "link_pool" restat = "1" } tool("link") { - command = - "$ld \$ldflags -o \$out -Wl,--start-group \$in \$solibs -Wl,--end-group \$libs" + command = "$ld \$ldflags -o \$out -Wl,--start-group \$in \$solibs -Wl,--end-group \$libs" description = "LINK(NaCl x86 Newlib) \$out" #pool = "link_pool" diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn index 1be1cf4..b8f87e7 100644 --- a/build/toolchain/win/BUILD.gn +++ b/build/toolchain/win/BUILD.gn @@ -81,12 +81,12 @@ template("msvc_toolchain") { tool("cc") { rspfile = "{{output}}.rsp" pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" - command = - "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" + command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" depsformat = "msvc" description = "CC {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", + ] rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" } @@ -95,37 +95,36 @@ template("msvc_toolchain") { # The PDB name needs to be different between C and C++ compiled files. pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" - command = - "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" + command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" depsformat = "msvc" description = "CXX {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", + ] rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" } tool("rc") { - command = - "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{include_dirs}} /fo{{output}} {{source}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.res" ] + command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{include_dirs}} /fo{{output}} {{source}}" + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.res", + ] description = "RC {{output}}" } tool("asm") { # TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract # assembler flags to a variable like cflags. crbug.com/418613 - command = - "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} /safeseh /c /Fo {{output}} {{source}}" + command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} /safeseh /c /Fo {{output}} {{source}}" description = "ASM {{output}}" - outputs = - [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj" ] + outputs = [ + "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", + ] } tool("alink") { rspfile = "{{output}}.rsp" - command = - "$python_path gyp-win-tool link-wrapper $env False lib.exe /nologo /ignore:4221 /OUT:{{output}} @$rspfile" + command = "$python_path gyp-win-tool link-wrapper $env False lib.exe /nologo /ignore:4221 /OUT:{{output}} @$rspfile" description = "LIB {{output}}" outputs = [ # Ignore {{output_extension}} and always use .lib, there's no reason to @@ -145,8 +144,7 @@ template("msvc_toolchain") { "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.lib" # e.g. foo.dll.lib rspfile = "${dllname}.rsp" - link_command = - "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" + link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" # TODO(brettw) support manifests #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:${dllname}.manifest" @@ -170,8 +168,7 @@ template("msvc_toolchain") { tool("link") { rspfile = "{{output}}.rsp" - link_command = - "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" + link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" # TODO(brettw) support manifests #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:{{output}}.manifest" @@ -180,8 +177,9 @@ template("msvc_toolchain") { default_output_extension = ".exe" description = "LINK {{output}}" - outputs = - [ "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" ] + outputs = [ + "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", + ] # The use of inputs_newline is to work around a fixed per-line buffer # size in the linker. diff --git a/build/util/BUILD.gn b/build/util/BUILD.gn index 3fc7757..c18f0ce 100644 --- a/build/util/BUILD.gn +++ b/build/util/BUILD.gn @@ -15,7 +15,9 @@ action("webkit_version") { ] output_file = "$root_gen_dir/webkit_version.h" - outputs = [ output_file ] + outputs = [ + output_file, + ] args = [ "-f", |