diff options
author | scottmg <scottmg@chromium.org> | 2014-12-02 23:28:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-03 07:29:20 +0000 |
commit | 1c240d2719e764ed0108aa59ba35a6d99c00491a (patch) | |
tree | f33b022e82cbca0f69637da64415fe5259496c89 /third_party | |
parent | d83fc265629d2a24078132b260c76192f3cc68f1 (diff) | |
download | chromium_src-1c240d2719e764ed0108aa59ba35a6d99c00491a.zip chromium_src-1c240d2719e764ed0108aa59ba35a6d99c00491a.tar.gz chromium_src-1c240d2719e764ed0108aa59ba35a6d99c00491a.tar.bz2 |
gn format //third_party
Uses gn binary at head.
No intended functionality change.
R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/779473002
Cr-Commit-Position: refs/heads/master@{#306567}
Diffstat (limited to 'third_party')
39 files changed, 491 insertions, 448 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index cdecbcd..261cb1f 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -31,9 +31,13 @@ group("jpeg") { libs = [ "jpeg" ] public_configs = [ ":system_libjpeg_config" ] } else if (use_libjpeg_turbo) { - deps = [ "//third_party/libjpeg_turbo:libjpeg" ] + deps = [ + "//third_party/libjpeg_turbo:libjpeg", + ] public_configs = [ ":libjpeg_turbo_config" ] } else { - deps = [ "//third_party/libjpeg:libjpeg" ] + deps = [ + "//third_party/libjpeg:libjpeg", + ] } } diff --git a/third_party/adobe/flash/BUILD.gn b/third_party/adobe/flash/BUILD.gn index eb7ef2c..b23f269 100644 --- a/third_party/adobe/flash/BUILD.gn +++ b/third_party/adobe/flash/BUILD.gn @@ -49,7 +49,9 @@ if (is_chrome_branded) { } copy("flapper_version_h") { - sources = [ flapper_version_h_file ] + sources = [ + flapper_version_h_file, + ] outputs = [ "$root_gen_dir/{{source_file_part}}" ] } diff --git a/third_party/android_protobuf/BUILD.gn b/third_party/android_protobuf/BUILD.gn index ccecf79..252bc8d 100644 --- a/third_party/android_protobuf/BUILD.gn +++ b/third_party/android_protobuf/BUILD.gn @@ -9,7 +9,7 @@ if (current_toolchain == host_toolchain) { configs += [ "//build/config/compiler:no_chromium_code" ] deps = [ - "//third_party/zlib" + "//third_party/zlib", ] sources = [ diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn index ccd8424..88676ad 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -7,9 +7,7 @@ config("openssl_config") { include_dirs = [] include_dirs += [ "src/include" ] if (is_component_build) { - defines = [ - "BORINGSSL_SHARED_LIBRARY", - ] + defines = [ "BORINGSSL_SHARED_LIBRARY" ] } } @@ -19,11 +17,11 @@ config("openssl_internal_config") { } # The list of BoringSSL files is kept in boringssl.gypi. -gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("//third_party/boringssl/boringssl.gypi") ], - "scope", - [ "//third_party/boringssl/boringssl.gypi" ]) +gypi_values = + exec_script("//build/gypi_to_gn.py", + [ rebase_path("//third_party/boringssl/boringssl.gypi") ], + "scope", + [ "//third_party/boringssl/boringssl.gypi" ]) # Windows' assembly is built with Yasm. The other platforms use the platform # assembler. @@ -49,9 +47,7 @@ component("boringssl") { "BORINGSSL_NO_STATIC_INITIALIZER", ] if (is_component_build) { - defines += [ - "BORINGSSL_SHARED_LIBRARY", - ] + defines += [ "BORINGSSL_SHARED_LIBRARY" ] } configs -= [ "//build/config/compiler:chromium_code" ] @@ -60,6 +56,7 @@ component("boringssl") { # Also gets the include dirs from :openssl_config include_dirs = [ "src/include", + # This is for arm_arch.h, which is needed by some asm files. Since the # asm files are generated and kept in a different directory, they # cannot use relative paths to find this file. @@ -69,7 +66,7 @@ component("boringssl") { if (is_win) { # TODO(davidben): Fix size_t truncations in BoringSSL. # https://crbug.com/429039 - cflags += [ "/wd4267"] + cflags += [ "/wd4267" ] } if (cpu_arch == "x64") { diff --git a/third_party/brotli/BUILD.gn b/third_party/brotli/BUILD.gn index 73fb5b9..fa856ee 100644 --- a/third_party/brotli/BUILD.gn +++ b/third_party/brotli/BUILD.gn @@ -42,7 +42,9 @@ source_set("woff2_dec") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ ":brotli" ] + deps = [ + ":brotli", + ] include_dirs = [ "src/brotli/dec", diff --git a/third_party/cld_2/BUILD.gn b/third_party/cld_2/BUILD.gn index 917e1d0..bede93a 100644 --- a/third_party/cld_2/BUILD.gn +++ b/third_party/cld_2/BUILD.gn @@ -4,11 +4,10 @@ import("//build/config/features.gni") -gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("cld_2.gyp") ], - "scope", - [ "cld_2.gyp" ]) +gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("cld_2.gyp") ], + "scope", + [ "cld_2.gyp" ]) # This variable controls which dependency is resolved by the pass-through # target 'cld2_platform_impl', and allows the embedder to choose which @@ -32,7 +31,6 @@ gypi_values = exec_script( # components/translate/content/renderer/renderer_cld_utils.cc cld2_platform_support = "static" - cld2_table_size = 2 source_set("cld2_data") { @@ -58,7 +56,7 @@ source_set("cld2_data") { # As in the corresponding gyp file, this just builds the core interfaces for # CLD2. You must still declare a dependency on a specific data set, either -# cld2_dynamic or cld2_static. +# cld2_dynamic or cld2_static. source_set("cld_2") { sources = gypi_values.cld2_core_sources include_dirs = [ @@ -74,7 +72,6 @@ source_set("cld_2") { } } - source_set("cld2_platform_impl") { deps = [] if (cld2_platform_support == "static") { @@ -91,7 +88,10 @@ static_library("cld2_static") { "src/public", ] - deps = [ ":cld_2", ":cld2_data" ] + deps = [ + ":cld_2", + ":cld2_data", + ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] @@ -105,14 +105,18 @@ config("cld2_dynamic_mode_config") { } static_library("cld2_dynamic") { - sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources + gypi_values.cld2_dynamic_data_loader_sources + sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources + + gypi_values.cld2_dynamic_data_loader_sources include_dirs = [ "src/internal", "src/public", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config" ] + configs += [ + "//build/config/compiler:no_chromium_code", + ":cld2_dynamic_mode_config", + ] if (is_win) { cflags = [ "/wd4267" ] # size_t -> int conversion. @@ -133,10 +137,16 @@ if (!is_win) { "src/public", ] - deps = [ ":cld2_data", ":cld2_dynamic" ] + deps = [ + ":cld2_data", + ":cld2_dynamic", + ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config" ] + configs += [ + "//build/config/compiler:no_chromium_code", + ":cld2_dynamic_mode_config", + ] if (is_win) { cflags = [ "/wd4267" ] # size_t -> int conversion. diff --git a/third_party/cython/rules.gni b/third_party/cython/rules.gni index 1d2ccfb..cea1e36 100644 --- a/third_party/cython/rules.gni +++ b/third_party/cython/rules.gni @@ -22,26 +22,20 @@ template("python_binary_module_sources") { sources = invoker.sources outputs = [ cython_output ] args = [ - "--cplus", - "-I", - rebase_path("//", root_build_dir), - "-o", - rebase_path(cython_output, root_build_dir), - ] + rebase_path(sources, root_build_dir) + "--cplus", + "-I", + rebase_path("//", root_build_dir), + "-o", + rebase_path(cython_output, root_build_dir), + ] + rebase_path(sources, root_build_dir) } config(config_name) { visibility = target_visibility python_flags = "//third_party/cython/python_flags.py" - include_dirs = exec_script(python_flags, - [ "--includes" ], - "list lines") - libs = exec_script(python_flags, - [ "--libraries" ], - "list lines") - lib_dirs = exec_script(python_flags, - [ "--library_dirs" ], - "list lines") + include_dirs = exec_script(python_flags, [ "--includes" ], "list lines") + libs = exec_script(python_flags, [ "--libraries" ], "list lines") + lib_dirs = exec_script(python_flags, [ "--library_dirs" ], "list lines") if (!is_win) { # Generated code includes static utility functions that often go unused. cflags = [ "-Wno-unused-function" ] @@ -49,7 +43,9 @@ template("python_binary_module_sources") { } source_set(target_name) { - deps = [ ":$generator_target_name" ] + deps = [ + ":$generator_target_name", + ] if (defined(invoker.visibility)) { visibility = invoker.visibility } @@ -59,7 +55,9 @@ template("python_binary_module_sources") { if (defined(invoker.datadeps)) { datadeps = invoker.datadeps } - sources = [ cython_output ] + sources = [ + cython_output, + ] if (defined(invoker.additional_sources)) { sources += invoker.additional_sources } @@ -95,7 +93,9 @@ template("python_binary_module") { shared_library(shared_library_name) { visibility = target_visibility - deps = [ ":$sources_target_name" ] + deps = [ + ":$sources_target_name", + ] if (defined(invoker.deps)) { deps += invoker.deps } @@ -113,11 +113,12 @@ template("python_binary_module") { copy(target_name) { python_base_module = invoker.python_base_module sources = [ - "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_library_suffix}" + "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_library_suffix}", ] - outputs = [ - "$root_out_dir/python/$python_base_module/${target_name}${python_module_suffix}" + outputs = + [ "$root_out_dir/python/$python_base_module/${target_name}${python_module_suffix}" ] + deps = [ + ":$shared_library_name", ] - deps = [ ":$shared_library_name" ] } } diff --git a/third_party/dom_distiller_js/BUILD.gn b/third_party/dom_distiller_js/BUILD.gn index 61cc53e..7136593 100644 --- a/third_party/dom_distiller_js/BUILD.gn +++ b/third_party/dom_distiller_js/BUILD.gn @@ -9,12 +9,16 @@ config("dependent_config") { } source_set("proto") { - public_deps = [ ":dom_distiller_proto" ] + public_deps = [ + ":dom_distiller_proto", + ] public_configs = [ ":dependent_config" ] } proto_library("dom_distiller_proto") { visibility = [ ":*" ] - sources = [ "package/proto/dom_distiller.proto" ] + sources = [ + "package/proto/dom_distiller.proto", + ] proto_out_dir = "third_party/dom_distiller_js" } diff --git a/third_party/elfutils/BUILD.gn b/third_party/elfutils/BUILD.gn index 4e34340..fca98ab 100644 --- a/third_party/elfutils/BUILD.gn +++ b/third_party/elfutils/BUILD.gn @@ -9,7 +9,6 @@ config("libelf_config") { source_set("libelf") { sources = [ "config.h", - "src/libelf/abstract.h", "src/libelf/common.h", "src/libelf/dl-hash.h", @@ -24,7 +23,6 @@ source_set("libelf") { "src/libelf/nlist.h", "src/libelf/note_xlate.h", "src/libelf/version_xlate.h", - "src/libelf/elf32_checksum.c", "src/libelf/elf32_fsize.c", "src/libelf/elf32_getehdr.c", diff --git a/third_party/freetype2/BUILD.gn b/third_party/freetype2/BUILD.gn index 18ef5f5..fe3d921 100644 --- a/third_party/freetype2/BUILD.gn +++ b/third_party/freetype2/BUILD.gn @@ -5,7 +5,10 @@ assert(is_linux, "This file should only be depended on from Linux.") config("freetype2_config") { - include_dirs = [ "include", "src/include" ] + include_dirs = [ + "include", + "src/include", + ] } shared_library("freetype2") { @@ -56,7 +59,6 @@ shared_library("freetype2") { defines = [ "FT_CONFIG_OPTION_SYSTEM_ZLIB", "FT2_BUILD_LIBRARY", - "FT_CONFIG_CONFIG_H=<ftconfig.h>", # See comments in README.chromium. "FT_CONFIG_MODULES_H=<ftmodule.h>", # See comments in README.chromium. ] @@ -64,7 +66,7 @@ shared_library("freetype2") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":freetype2_config" ] - + public_configs = [ ":freetype2_config" ] libs = [ "z" ] diff --git a/third_party/google_input_tools/closure.gni b/third_party/google_input_tools/closure.gni index 526dbd0..0d1b0c1 100644 --- a/third_party/google_input_tools/closure.gni +++ b/third_party/google_input_tools/closure.gni @@ -9,28 +9,37 @@ template("build_closure") { action(action_name) { script = "//third_party/google_input_tools/builder.py" sources = invoker.sources - outputs = [invoker.target] - args = ["--target", - rebase_path(invoker.target, root_build_dir)] - if(defined(invoker.json_file)) { + outputs = [ invoker.target ] + args = [ + "--target", + rebase_path(invoker.target, root_build_dir), + ] + if (defined(invoker.json_file)) { # Optionally parse list of sources from a json file. Useful when the list # is sufficiently long to create problems with length restrictions on the # command line. assert(defined(invoker.json_sources)) - args += ["--json_file", - rebase_path(invoker.json_file, root_build_dir), - "--json_sources", - invoker.json_sources] + args += [ + "--json_file", + rebase_path(invoker.json_file, root_build_dir), + "--json_sources", + invoker.json_sources, + ] } else { # If the number of source files is short, they can be directly extracted # from the command line. - args += ["--sources"] + sources + args += [ "--sources" ] + sources } - if(defined(invoker.path)) { - args += ["--path", invoker.path] + if (defined(invoker.path)) { + args += [ + "--path", + invoker.path, + ] } } group(target_name) { - deps = [ ":$action_name" ] + deps = [ + ":$action_name", + ] } } diff --git a/third_party/google_input_tools/inputview.gni b/third_party/google_input_tools/inputview.gni index 0c6cede..0c5d836 100644 --- a/third_party/google_input_tools/inputview.gni +++ b/third_party/google_input_tools/inputview.gni @@ -2,9 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -inputview_gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("inputview.gypi") ], - "scope", - [ "inputview.gypi" ]) -inputview_sources = rebase_path(inputview_gypi_values.inputview_sources)
\ No newline at end of file +inputview_gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("inputview.gypi") ], + "scope", + [ "inputview.gypi" ]) +inputview_sources = rebase_path(inputview_gypi_values.inputview_sources) diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn index 195c5c8..a1b25eb 100644 --- a/third_party/harfbuzz-ng/BUILD.gn +++ b/third_party/harfbuzz-ng/BUILD.gn @@ -28,10 +28,12 @@ declare_args() { # Use the system harfbuzz for newer versions of pangoft, and not for older # ones. pangoft links to the system harfbuzz starting with 1.31.0, which # causes duplicate symbols when we link our own version. - use_system_harfbuzz = exec_script( - pkg_config_script, - pkg_config_args + [ "--atleast-version=1.31.0", "pangoft2" ], - "value") + use_system_harfbuzz = exec_script(pkg_config_script, + pkg_config_args + [ + "--atleast-version=1.31.0", + "pangoft2", + ], + "value") } else { use_system_harfbuzz = false } @@ -45,7 +47,6 @@ if (use_system_harfbuzz) { group("harfbuzz-ng") { public_configs = [ ":harfbuzz_pkgconfig" ] } - } else { config("harfbuzz-ng_config") { include_dirs = [ "src" ] diff --git a/third_party/iaccessible2/BUILD.gn b/third_party/iaccessible2/BUILD.gn index 56aba37..798f8d2 100644 --- a/third_party/iaccessible2/BUILD.gn +++ b/third_party/iaccessible2/BUILD.gn @@ -24,5 +24,7 @@ shared_library("IAccessible2Proxy") { libs = [ "rpcrt4.lib" ] - deps = [ ":iaccessible2" ] + deps = [ + ":iaccessible2", + ] } diff --git a/third_party/iccjpeg/BUILD.gn b/third_party/iccjpeg/BUILD.gn index 86bdd73..4c4a995 100644 --- a/third_party/iccjpeg/BUILD.gn +++ b/third_party/iccjpeg/BUILD.gn @@ -9,9 +9,11 @@ config("iccjpeg_config") { source_set("iccjpeg") { sources = [ "iccjpeg.c", - "iccjpeg.h" + "iccjpeg.h", ] public_configs = [ ":iccjpeg_config" ] - deps = [ "//third_party:jpeg" ] + deps = [ + "//third_party:jpeg", + ] } diff --git a/third_party/isimpledom/BUILD.gn b/third_party/isimpledom/BUILD.gn index df076e7..a9ec86f 100644 --- a/third_party/isimpledom/BUILD.gn +++ b/third_party/isimpledom/BUILD.gn @@ -12,7 +12,6 @@ midl("isimpledom") { "ISimpleDOMNode.idl", "ISimpleDOMText.idl", ] - # Note: GYP version sets 'GenerateTypeLibrary': 'false'. It doesn't seem to # be harmful to generate this, however. } diff --git a/third_party/jsoncpp/BUILD.gn b/third_party/jsoncpp/BUILD.gn index 55189e7..cf40895 100644 --- a/third_party/jsoncpp/BUILD.gn +++ b/third_party/jsoncpp/BUILD.gn @@ -29,11 +29,7 @@ source_set("jsoncpp") { public_configs = [ ":jsoncpp_config" ] - defines = [ - "JSON_USE_EXCEPTION=0", - ] + defines = [ "JSON_USE_EXCEPTION=0" ] - include_dirs = [ - "source/src/lib_json", - ] + include_dirs = [ "source/src/lib_json" ] } diff --git a/third_party/junit/BUILD.gn b/third_party/junit/BUILD.gn index 437f956..1b02acf 100644 --- a/third_party/junit/BUILD.gn +++ b/third_party/junit/BUILD.gn @@ -12,7 +12,7 @@ java_prebuilt("hamcrest") { # GYP: //third_party/junit.gyp:junit_jar java_library("junit") { deps = [ - ":hamcrest" + ":hamcrest", ] DEPRECATED_java_in_dir = "src/src/main/java" } diff --git a/third_party/libaddressinput/BUILD.gn b/third_party/libaddressinput/BUILD.gn index 8e65d69..99c2be2 100644 --- a/third_party/libaddressinput/BUILD.gn +++ b/third_party/libaddressinput/BUILD.gn @@ -105,9 +105,7 @@ static_library("util") { "chromium/addressinput_util.cc", "chromium/json.cc", ] - sources -= [ - "src/cpp/src/util/json.cc", - ] + sources -= [ "src/cpp/src/util/json.cc" ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] @@ -197,12 +195,10 @@ if (is_android) { } } else { # The list of files in libaddressinput.gypi. - gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("src/cpp/libaddressinput.gypi") ], - "scope", - [ "src/cpp/libaddressinput.gypi" ]) - + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("src/cpp/libaddressinput.gypi") ], + "scope", + [ "src/cpp/libaddressinput.gypi" ]) # This target provides more complicated functionality like pinging servers # for validation rules. @@ -219,9 +215,7 @@ if (is_android) { "chromium/trie.cc", ] sources -= libaddressinput_util_files - sources -= [ - "src/cpp/src/util/string_compare.cc", - ] + sources -= [ "src/cpp/src/util/string_compare.cc" ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] @@ -239,8 +233,8 @@ if (is_android) { } test("libaddressinput_unittests") { - sources = rebase_path( - gypi_values.libaddressinput_test_files, ".", "src/cpp") + sources = + rebase_path(gypi_values.libaddressinput_test_files, ".", "src/cpp") sources += [ "chromium/addressinput_util_unittest.cc", "chromium/chrome_address_validator_unittest.cc", @@ -255,13 +249,9 @@ if (is_android) { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - defines = [ - "TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"", - ] + defines = [ "TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"" ] - include_dirs = [ - "src/cpp/src", - ] + include_dirs = [ "src/cpp/src" ] deps = [ ":libaddressinput", diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn index a7c8d87..90b1e2c 100644 --- a/third_party/libjingle/BUILD.gn +++ b/third_party/libjingle/BUILD.gn @@ -52,7 +52,6 @@ config("jingle_unexported_configs") { "SSL_USE_NSS_RNG", ] } - } # From third_party/libjingle/libjingle.gyp's target_defaults. @@ -72,15 +71,26 @@ config("jingle_direct_dependent_configs") { "NO_MAIN_THREAD_WRAPPING", "NO_SOUND_SYSTEM", ] + # TODO(GYP): Port is_win blocks. if (is_linux) { - defines += [ "LINUX", "WEBRTC_LINUX" ] + defines += [ + "LINUX", + "WEBRTC_LINUX", + ] } if (is_mac) { - defines += [ "OSX", "WEBRTC_MAC" ] + defines += [ + "OSX", + "WEBRTC_MAC", + ] } if (is_ios) { - defines += [ "IOS", "WEBRTC_MAC", "WEBRTC_IOS" ] + defines += [ + "IOS", + "WEBRTC_MAC", + "WEBRTC_IOS", + ] } if (is_win) { defines += [ "WEBRTC_WIN" ] @@ -89,8 +99,12 @@ config("jingle_direct_dependent_configs") { defines += [ "ANDROID" ] } if (is_posix) { - defines += [ "POSIX", "WEBRTC_POSIX" ] + defines += [ + "POSIX", + "WEBRTC_POSIX", + ] } + # TODO(GYP): Support these in GN. # if (is_bsd) { # defines += [ "BSD" ] @@ -252,7 +266,7 @@ static_library("libjingle") { "$p2p_dir/base/constants.h", ] public_deps = [ - ":jingle_deps" + ":jingle_deps", ] deps = [ "//third_party/webrtc/base:webrtc_base", @@ -261,18 +275,15 @@ static_library("libjingle") { # From libjingle_common.gypi's conditions list. if (is_win) { - cflags = [ "/wd4005", "/wd4267" ] + cflags = [ + "/wd4005", + "/wd4267", + ] } - configs += [ - ":jingle_unexported_configs" - ] - public_configs = [ - ":jingle_direct_dependent_configs", - ] - all_dependent_configs = [ - ":jingle_all_dependent_configs", - ] + configs += [ ":jingle_unexported_configs" ] + public_configs = [ ":jingle_direct_dependent_configs" ] + all_dependent_configs = [ ":jingle_all_dependent_configs" ] } # This has to be is a separate project due to a bug in MSVS 2008 and the @@ -293,15 +304,9 @@ static_library("libjingle_p2p_constants") { public_deps = [ ":jingle_deps", ] - configs += [ - ":jingle_unexported_configs" - ] - public_configs = [ - ":jingle_direct_dependent_configs", - ] - all_dependent_configs = [ - ":jingle_all_dependent_configs", - ] + configs += [ ":jingle_unexported_configs" ] + public_configs = [ ":jingle_direct_dependent_configs" ] + all_dependent_configs = [ ":jingle_all_dependent_configs" ] } # GYP version: third_party/libjingle.gyp:peerconnnection_server @@ -316,9 +321,7 @@ source_set("peerconnnection_server") { "source/talk/examples/peerconnection/server/utils.cc", "source/talk/examples/peerconnection/server/utils.h", ] - include_dirs = [ - "source", - ] + include_dirs = [ "source" ] public_deps = [ ":jingle_deps", ] @@ -326,15 +329,9 @@ source_set("peerconnnection_server") { ":libjingle", ":jingle_deps", ] - configs += [ - ":jingle_unexported_configs" - ] - public_configs = [ - ":jingle_direct_dependent_configs", - ] - all_dependent_configs = [ - ":jingle_all_dependent_configs", - ] + configs += [ ":jingle_unexported_configs" ] + public_configs = [ ":jingle_direct_dependent_configs" ] + all_dependent_configs = [ ":jingle_all_dependent_configs" ] if (is_win) { # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. cflags = [ "/wd4309" ] @@ -342,7 +339,6 @@ source_set("peerconnnection_server") { } if (enable_webrtc) { - source_set("libjingle_webrtc") { sources = [ "overrides/init_webrtc.cc", @@ -350,7 +346,9 @@ if (enable_webrtc) { ] configs += [ ":jingle_unexported_configs" ] public_configs = [ ":jingle_direct_dependent_configs" ] - deps = [ ":libjingle_webrtc_common" ] + deps = [ + ":libjingle_webrtc_common", + ] } # Note: this does not support the shared library build of libpeerconnection @@ -358,7 +356,6 @@ if (enable_webrtc) { source_set("libjingle_webrtc_common") { sources = [ "overrides/talk/media/webrtc/webrtcexport.h", - "source/talk/app/webrtc/audiotrack.cc", "source/talk/app/webrtc/audiotrack.h", "source/talk/app/webrtc/audiotrackrenderer.cc", @@ -592,7 +589,5 @@ if (enable_webrtc) { "source/talk/app/webrtc/java/src/org/webrtc/VideoTrack.java", ] } - } # enable_webrtc - # TODO(GYP): Port libjingle.gyp's enable_webrtc condition block. diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn index d4aaf18..488ef43 100644 --- a/third_party/libpng/BUILD.gn +++ b/third_party/libpng/BUILD.gn @@ -3,9 +3,7 @@ # found in the LICENSE file. config("libpng_config") { - include_dirs = [ - ".", - ] + include_dirs = [ "." ] defines = [ "CHROME_PNG_WRITE_SUPPORT", @@ -14,9 +12,7 @@ config("libpng_config") { if (is_android) { #'toolsets': ['target', 'host'], - defines += [ - "CHROME_PNG_READ_PACK_SUPPORT", # Required by freetype. - ] + defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype. } if (is_win) { @@ -30,7 +26,7 @@ config("libpng_config") { } source_set("libpng_sources") { - sources = [ + sources = [ "png.c", "png.h", "pngconf.h", @@ -66,15 +62,21 @@ source_set("libpng_sources") { public_configs = [ ":libpng_config" ] - public_deps = [ "//third_party/zlib" ] + public_deps = [ + "//third_party/zlib", + ] } if (is_win) { component("libpng") { - public_deps = [ ":libpng_sources" ] + public_deps = [ + ":libpng_sources", + ] } } else { group("libpng") { - public_deps = [ ":libpng_sources" ] + public_deps = [ + ":libpng_sources", + ] } } diff --git a/third_party/libusb/BUILD.gn b/third_party/libusb/BUILD.gn index 30ae077..91409b8 100644 --- a/third_party/libusb/BUILD.gn +++ b/third_party/libusb/BUILD.gn @@ -5,9 +5,7 @@ assert(!is_android && !is_ios) config("libusb_config") { - include_dirs = [ - "src/libusb", - ] + include_dirs = [ "src/libusb" ] } static_library("libusb") { @@ -47,9 +45,7 @@ static_library("libusb") { "src/msvc/stdint.h", ] deps = [] - include_dirs = [ - "src/libusb/os", - ] + include_dirs = [ "src/libusb/os" ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] diff --git a/third_party/libwebp/BUILD.gn b/third_party/libwebp/BUILD.gn index 7ea5d2c..72a6903 100644 --- a/third_party/libwebp/BUILD.gn +++ b/third_party/libwebp/BUILD.gn @@ -8,9 +8,9 @@ config("libwebp_config") { include_dirs = [ "." ] } -use_dsp_neon = (cpu_arch == "arm64" || - (cpu_arch == "arm" && arm_version >= 7 && - (arm_use_neon || arm_optionally_use_neon))) +use_dsp_neon = + cpu_arch == "arm64" || (cpu_arch == "arm" && arm_version >= 7 && + (arm_use_neon || arm_optionally_use_neon)) source_set("libwebp_dec") { sources = [ @@ -33,11 +33,9 @@ source_set("libwebp_dec") { ":libwebp_dsp", ":libwebp_utils", ] - all_dependent_configs = [ - ":libwebp_config" - ] + all_dependent_configs = [ ":libwebp_config" ] if (use_dsp_neon) { - deps += [ ":libwebp_dsp_neon"] + deps += [ ":libwebp_dsp_neon" ] } } @@ -45,14 +43,11 @@ source_set("libwebp_demux") { sources = [ "demux/demux.c", ] - all_dependent_configs = [ - ":libwebp_config" - ] + all_dependent_configs = [ ":libwebp_config" ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] } - source_set("libwebp_dsp") { sources = [ "dsp/alpha_processing.c", @@ -78,58 +73,55 @@ source_set("libwebp_dsp") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - all_dependent_configs = [ - ":libwebp_config" - ] + all_dependent_configs = [ ":libwebp_config" ] deps = [] if (is_android) { deps += [ "//third_party/android_tools:cpu_features" ] } -# TODO(GYP): -# 'conditions': [ -# ['order_profiling != 0', { -# 'target_conditions' : [ -# ['_toolset=="target"', { -# 'cflags!': [ '-finstrument-functions' ], -# }], -# ], -# }], -# ], + + # TODO(GYP): + # 'conditions': [ + # ['order_profiling != 0', { + # 'target_conditions' : [ + # ['_toolset=="target"', { + # 'cflags!': [ '-finstrument-functions' ], + # }], + # ], + # }], + # ], } if (use_dsp_neon) { - -source_set("libwebp_dsp_neon") { - sources = [ - "dsp/dec_neon.c", - "dsp/enc_neon.c", - "dsp/lossless_neon.c", - "dsp/upsampling_neon.c", - ] - - include_dirs = [ "." ] - - if (cpu_arch == "arm") { - # behavior similar to *.c.neon in an Android.mk - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } else if (cpu_arch == "arm64") { - # avoid an ICE with gcc-4.9: b/15574841 - cflags = [ "-frename-registers" ] + source_set("libwebp_dsp_neon") { + sources = [ + "dsp/dec_neon.c", + "dsp/enc_neon.c", + "dsp/lossless_neon.c", + "dsp/upsampling_neon.c", + ] + + include_dirs = [ "." ] + + if (cpu_arch == "arm") { + # behavior similar to *.c.neon in an Android.mk + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } else if (cpu_arch == "arm64") { + # avoid an ICE with gcc-4.9: b/15574841 + cflags = [ "-frename-registers" ] + } + + # TODO(GYP): + # ['order_profiling != 0', { + # 'target_conditions' : [ + # ['_toolset=="target"', { + # 'cflags!': [ '-finstrument-functions' ], + # }], + # ], + # }], + # ], + # } } - -# TODO(GYP): -# ['order_profiling != 0', { -# 'target_conditions' : [ -# ['_toolset=="target"', { -# 'cflags!': [ '-finstrument-functions' ], -# }], -# ], -# }], -# ], -# } -} - } # use_dsp_neon source_set("libwebp_enc") { @@ -158,9 +150,7 @@ source_set("libwebp_enc") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - all_dependent_configs = [ - ":libwebp_config" - ] + all_dependent_configs = [ ":libwebp_config" ] } source_set("libwebp_utils") { @@ -181,9 +171,7 @@ source_set("libwebp_utils") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - all_dependent_configs = [ - ":libwebp_config" - ] + all_dependent_configs = [ ":libwebp_config" ] } group("libwebp") { @@ -194,9 +182,7 @@ group("libwebp") { ":libwebp_enc", ":libwebp_utils", ] - public_configs = [ - ":libwebp_config" - ] + public_configs = [ ":libwebp_config" ] if (use_dsp_neon) { deps += [ ":libwebp_dsp_neon" ] } diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn index 73bb3dc..17ea09a 100644 --- a/third_party/libxml/BUILD.gn +++ b/third_party/libxml/BUILD.gn @@ -110,6 +110,7 @@ static_library("libxml") { "src/schematron.c", "src/threads.c", "src/tree.c", + #"src/trio.c", #"src/trio.h", #"src/triodef.h", @@ -151,9 +152,7 @@ static_library("libxml") { ] if (is_win) { - cflags_c = [ - "/wd4101", # Unreferenced local variable. - ] + cflags_c = [ "/wd4101" ] # Unreferenced local variable. } else if (is_mac || is_android) { # http://www.xmlsoft.org/threads.html says that this is required when using # libxml from several threads, which can possibly happen in chrome. On @@ -181,7 +180,5 @@ static_library("libxml") { ] } - include_dirs = [ - "$os_include", - ] + include_dirs = [ "$os_include" ] } diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn index 511525a..4989a37 100644 --- a/third_party/mesa/BUILD.gn +++ b/third_party/mesa/BUILD.gn @@ -49,6 +49,7 @@ config("mesa_internal_config") { "HAVE_LIBXCB_DRI2=1", "FEATURE_GL=1", "MAPI_MODE_GLAPI", + #"USE_X86_64_ASM", "IN_DRI_DRIVER", "USE_XCB", @@ -89,9 +90,7 @@ config("mesa_internal_config") { } if (is_linux) { - defines += [ - "_GNU_SOURCE", - ] + defines += [ "_GNU_SOURCE" ] } if (is_posix) { @@ -223,6 +222,7 @@ static_library("mesa_libglslcommon") { "src/src/glsl/ralloc.h", "src/src/glsl/s_expression.cpp", "src/src/glsl/s_expression.h", + # Skipped in the GN build. This file duplicates symbols from errors.c and # happens to link in GYP due to static library link ordering. #"src/src/glsl/standalone_scaffolding.cpp", @@ -231,12 +231,8 @@ static_library("mesa_libglslcommon") { "src/src/glsl/strtod.h", ] - configs -= [ - "//build/config/compiler:chromium_code", - ] - configs += [ - "//build/config/compiler:no_chromium_code", - ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] previous_configs = configs configs = [] configs = [ ":mesa_internal_config" ] + previous_configs @@ -617,12 +613,8 @@ static_library("mesa") { "src/src/mesa/x86-64/x86-64.h", ] - configs -= [ - "//build/config/compiler:chromium_code", - ] - configs += [ - "//build/config/compiler:no_chromium_code", - ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] previous_configs = configs configs = [] configs = [ ":mesa_internal_config" ] + previous_configs @@ -651,54 +643,49 @@ static_library("mesa") { } if (!is_android) { # TODO(GYP) enable for Android. + # Building this target will hide the native OpenGL shared library and + # replace it with a slow software renderer. + # TODO(GYP) http://crbug.com/380327 need support for loadable_module. + #loadable_module("osmesa") { + shared_library("osmesa") { + sources = [ + "src/src/mesa/drivers/common/driverfuncs.c", + "src/src/mesa/drivers/common/driverfuncs.h", + "src/src/mesa/drivers/common/meta.c", + "src/src/mesa/drivers/common/meta.h", + "src/src/mesa/drivers/osmesa/osmesa.c", + "src/src/mesa/drivers/osmesa/osmesa.def", + ] -# Building this target will hide the native OpenGL shared library and -# replace it with a slow software renderer. -# TODO(GYP) http://crbug.com/380327 need support for loadable_module. -#loadable_module("osmesa") { -shared_library("osmesa") { - sources = [ - "src/src/mesa/drivers/common/driverfuncs.c", - "src/src/mesa/drivers/common/driverfuncs.h", - "src/src/mesa/drivers/common/meta.c", - "src/src/mesa/drivers/common/meta.h", - "src/src/mesa/drivers/osmesa/osmesa.c", - "src/src/mesa/drivers/osmesa/osmesa.def", - ] - - configs -= [ - "//build/config/compiler:chromium_code", - ] - configs += [ - ":mesa_headers_config", - "//build/config/compiler:no_chromium_code", - ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs - - include_dirs = [ "src/src/mesa/drivers" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + ":mesa_headers_config", + "//build/config/compiler:no_chromium_code", + ] + previous_configs = configs + configs = [] + configs = [ ":mesa_internal_config" ] + previous_configs - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } + include_dirs = [ "src/src/mesa/drivers" ] - deps = [ - ":mesa_headers", - ":mesa", - ":mesa_libglslcommon", - ] + if (is_clang) { + # Mesa triggers some of these Clang warnings. + configs -= [ "//build/config/clang:extra_warnings" ] + } - if (is_win) { - defines = [ - "BUILD_GL32", - "KEYWORD1=GLAPI", - "KEYWORD2=GLAPIENTRY", + deps = [ + ":mesa_headers", + ":mesa", + ":mesa_libglslcommon", ] - } -} + if (is_win) { + defines = [ + "BUILD_GL32", + "KEYWORD1=GLAPI", + "KEYWORD2=GLAPIENTRY", + ] + } + } } # !is_android - # TODO(GYP) Android osmesa_in_lib_dir target. diff --git a/third_party/mozilla/BUILD.gn b/third_party/mozilla/BUILD.gn index ca41a3d..8c21b72 100644 --- a/third_party/mozilla/BUILD.gn +++ b/third_party/mozilla/BUILD.gn @@ -19,9 +19,7 @@ component("mozilla") { "NSWorkspace+Utils.m", ] - defines = [ - "MOZILLA_IMPLEMENTATION", - ] + defines = [ "MOZILLA_IMPLEMENTATION" ] deps = [ "//url", diff --git a/third_party/npapi/BUILD.gn b/third_party/npapi/BUILD.gn index 09dd9b9..ad17083 100644 --- a/third_party/npapi/BUILD.gn +++ b/third_party/npapi/BUILD.gn @@ -5,7 +5,10 @@ config("npapi_config") { # Some things #include "bindings/npapi.h" and others just #include # "npapi.h". Account for both flavors. - include_dirs = [ ".", "bindings" ] + include_dirs = [ + ".", + "bindings", + ] } source_set("npapi") { diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn index 2e95756..696234d 100644 --- a/third_party/opus/BUILD.gn +++ b/third_party/opus/BUILD.gn @@ -5,20 +5,18 @@ import("//build/config/arm.gni") # If fixed point implementation shall be used (otherwise float). -use_opus_fixed_point = (cpu_arch == "arm" || cpu_arch == "arm64") +use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" # If ARM optimizations shall be used to accelerate performance. -use_opus_arm_optimization = (cpu_arch == "arm") +use_opus_arm_optimization = cpu_arch == "arm" # If OPUS Run Time CPU Detections (RTCD) shall be used. # Based on the conditions in celt/arm/armcpu.c: # defined(_MSC_VER) || defined(__linux__). -use_opus_rtcd = (cpu_arch == "arm" && (is_win || is_android || is_linux)) +use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) config("opus_config") { - include_dirs = [ - "src/include", - ] + include_dirs = [ "src/include" ] } if (use_opus_rtcd) { @@ -26,22 +24,19 @@ if (use_opus_rtcd) { script = "convert_rtcd_assembler.py" outputs = [ "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S" ] args = [ - rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", - root_build_dir), + rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", root_build_dir), - rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", - root_build_dir), + rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), ] } } source_set("opus") { - gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("opus_srcs.gypi") ], - "scope", - [ "opus_srcs.gypi" ]) + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("opus_srcs.gypi") ], + "scope", + [ "opus_srcs.gypi" ]) sources = gypi_values.opus_common_sources defines = [ @@ -79,9 +74,7 @@ source_set("opus") { if (is_posix && !is_android) { # Suppress a warning given by opus_decoder.c that tells us # optimizations are turned off. - cflags = [ - "-Wno-#pragma-messages", - ] + cflags = [ "-Wno-#pragma-messages" ] } if (!is_debug && is_posix && (cpu_arch == "arm" || cpu_arch == "arm64")) { @@ -94,15 +87,11 @@ source_set("opus") { defines += [ "FIXED_POINT" ] - include_dirs += [ - "src/silk/fixed", - ] + include_dirs += [ "src/silk/fixed" ] } else { sources += gypi_values.opus_float_sources - include_dirs += [ - "src/silk/float", - ] + include_dirs += [ "src/silk/float" ] } if (use_opus_arm_optimization) { @@ -139,7 +128,9 @@ source_set("opus") { "OPUS_HAVE_RTCD", ] - deps = [ ":convert_rtcd_assembler" ] + deps = [ + ":convert_rtcd_assembler", + ] } } } @@ -167,5 +158,7 @@ executable("opus_demo") { cflags = [ "-Wno-absolute-value" ] } - deps = [ ":opus" ] + deps = [ + ":opus", + ] } diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn index eddfc8a..973672b9 100644 --- a/third_party/protobuf/BUILD.gn +++ b/third_party/protobuf/BUILD.gn @@ -33,9 +33,7 @@ if (component_mode == "shared_library") { # This condif should be applied to targets using generated code from the proto # compiler. It sets up the include directories properly. config("using_proto") { - include_dirs = [ - "$root_gen_dir/protoc_out", - ] + include_dirs = [ "$root_gen_dir/protoc_out" ] } protobuf_lite_sources = [ @@ -139,7 +137,6 @@ source_set("protobuf_full") { "src/google/protobuf/compiler/java/java_doc_comment.cc", "src/google/protobuf/compiler/java/java_doc_comment.h", "src/google/protobuf/compiler/parser.h", - "src/google/protobuf/stubs/strutil.cc", "src/google/protobuf/stubs/strutil.h", "src/google/protobuf/stubs/substitute.cc", @@ -150,7 +147,6 @@ source_set("protobuf_full") { "src/google/protobuf/stubs/structurally_valid.cc", "src/google/protobuf/stubs/template_util.h", "src/google/protobuf/stubs/type_traits.h", - "src/google/protobuf/descriptor.cc", "src/google/protobuf/descriptor.pb.cc", "src/google/protobuf/descriptor_database.cc", @@ -162,6 +158,7 @@ source_set("protobuf_full") { "src/google/protobuf/service.cc", "src/google/protobuf/text_format.cc", "src/google/protobuf/wire_format.cc", + # This file pulls in zlib, but it's not actually used by protoc, so # instead of compiling zlib for the host, let's just exclude this. # "src/src/google/protobuf/io/gzip_stream.cc", diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni index 40fb80f..7bbf56d 100644 --- a/third_party/protobuf/proto_library.gni +++ b/third_party/protobuf/proto_library.gni @@ -84,25 +84,34 @@ template("proto_library") { args = [] if (defined(invoker.cc_include)) { - args += [ "--include", invoker.cc_include ] + args += [ + "--include", + invoker.cc_include, + ] } args += [ - "--protobuf", "$rel_out_dir/{{source_name_part}}.pb.h", - "--proto-in-dir", "{{source_dir}}", - "--proto-in-file", "{{source_file_part}}", + "--protobuf", + "$rel_out_dir/{{source_name_part}}.pb.h", + "--proto-in-dir", + "{{source_dir}}", + "--proto-in-file", + "{{source_file_part}}", + # TODO(brettw) support system protobuf compiler. "--use-system-protobuf=0", ] protoc_label = "//third_party/protobuf:protoc($host_toolchain)" args += [ - "--", + "--", + # Prepend with "./" so this will never pick up the system one (normally # when not cross-compiling, protoc's output directory will be the same # as the build dir, so the relative location will be empty). - "./" + rebase_path(get_label_info(protoc_label, "root_out_dir") + - "/protoc", root_build_dir), + "./" + + rebase_path(get_label_info(protoc_label, "root_out_dir") + "/protoc", + root_build_dir), ] # If passed cc_generator_options should end in a colon, which will separate @@ -115,11 +124,15 @@ template("proto_library") { } args += [ # cc_generator_options is supposed to end in a colon if it's nonempty. - "--cpp_out", "$cc_generator_options$rel_out_dir", - "--python_out", rel_out_dir, + "--cpp_out", + "$cc_generator_options$rel_out_dir", + "--python_out", + rel_out_dir, ] - deps = [ protoc_label ] + deps = [ + protoc_label, + ] if (defined(invoker.deps)) { deps += invoker.deps diff --git a/third_party/snappy/BUILD.gn b/third_party/snappy/BUILD.gn index d5daf64..0f440a5 100644 --- a/third_party/snappy/BUILD.gn +++ b/third_party/snappy/BUILD.gn @@ -3,9 +3,7 @@ # found in the LICENSE file. config("snappy_config") { - include_dirs = [ - "src", - ] + include_dirs = [ "src" ] # These OS-specific generated headers were made by running the configure # script offline. diff --git a/third_party/speex/BUILD.gn b/third_party/speex/BUILD.gn index a08a94f..1b5dc9a 100644 --- a/third_party/speex/BUILD.gn +++ b/third_party/speex/BUILD.gn @@ -3,9 +3,7 @@ # found in the LICENSE file. config("speex_config") { - include_dirs = [ - "include", # Clients expect <speex/speex.h> to be a system header. - ] + include_dirs = [ "include" ] # Clients expect <speex/speex.h> to be a system header. } source_set("speex") { @@ -74,9 +72,7 @@ source_set("speex") { public_configs = [ ":speex_config" ] - include_dirs = [ - "libspeex", - ] + include_dirs = [ "libspeex" ] defines = [ "FLOATING_POINT", diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn index be3f2d6..3d994d20 100644 --- a/third_party/sqlite/BUILD.gn +++ b/third_party/sqlite/BUILD.gn @@ -10,6 +10,7 @@ source_set("sqlite") { sources = [ "amalgamation/sqlite3.h", "amalgamation/sqlite3.c", + # fts2.c currently has a lot of conflicts when added to # the amalgamation. It is probably not worth fixing that. "src/ext/fts2/fts2.c", @@ -81,8 +82,10 @@ source_set("sqlite") { cflags += [ # sqlite does `if (*a++ && *b++);` in a non-buggy way. "-Wno-empty-body", + # sqlite has some `unsigned < 0` checks. "-Wno-tautological-compare", + # Needed because we don't have this commit yet: # https://github.com/mackyle/sqlite/commit/25df0fa050dcc9be7fb937b8e25be24049b3fef0 "-Wno-pointer-bool-conversion", @@ -101,6 +104,7 @@ if (is_linux) { sources = [ "src/src/shell.c", "src/src/shell_icu_linux.c", + # Include a dummy c++ file to force linking of libstdc++. "build_as_cpp.cc", ] @@ -114,7 +118,11 @@ if (is_linux) { if (is_ios) { source_set("sqlite_regexp") { - sources = [ "src/ext/icu/icu.c" ] - deps = [ "//third_party/icu" ] + sources = [ + "src/ext/icu/icu.c", + ] + deps = [ + "//third_party/icu", + ] } } diff --git a/third_party/stp/BUILD.gn b/third_party/stp/BUILD.gn index 22e40f3..553f41b 100644 --- a/third_party/stp/BUILD.gn +++ b/third_party/stp/BUILD.gn @@ -30,15 +30,11 @@ config("stp_config") { "-Wno-unused-function", "-Wno-unused-private-field", ] - cflags_cc = [ - "-fexceptions", - ] + cflags_cc = [ "-fexceptions" ] } config("stp_public_config") { - include_dirs = [ - "src/include", - ] + include_dirs = [ "src/include" ] } component("stp") { @@ -372,9 +368,7 @@ action_foreach("generate_lexer") { "src/lib/Parser/smt.lex", "src/lib/Parser/smt2.lex", ] - outputs = [ - "{{source_gen_dir}}/lex{{source_name_part}}.cpp", - ] + outputs = [ "{{source_gen_dir}}/lex{{source_name_part}}.cpp" ] args = [ "{{source}}", "{{source_name_part}}", diff --git a/third_party/usrsctp/BUILD.gn b/third_party/usrsctp/BUILD.gn index 254adce..45567e2 100644 --- a/third_party/usrsctp/BUILD.gn +++ b/third_party/usrsctp/BUILD.gn @@ -73,13 +73,14 @@ static_library("usrsctp") { "usrsctplib/user_socket.c", "usrsctplib/user_socketvar.h", "usrsctplib/user_uma.h", - "usrsctplib/usrsctp.h" + "usrsctplib/usrsctp.h", ] defines = [ "SCTP_PROCESS_LEVEL_LOCKS", "SCTP_SIMPLE_ALLOCATOR", "__Userspace__", + # "SCTP_DEBUG", # Uncomment for SCTP debugging. ] @@ -108,6 +109,7 @@ static_library("usrsctp") { if (is_win) { defines += [ "__Userspace_os_Windows", + # Manually setting WINVER and _WIN32_WINNT is needed because Chrome # sets WINVER to a newer version of windows. But compiling usrsctp # this way would is incompatible with windows XP. diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn index ecf3251..b5aa3de 100644 --- a/third_party/widevine/cdm/BUILD.gn +++ b/third_party/widevine/cdm/BUILD.gn @@ -14,29 +14,20 @@ if (is_android) { } else if (is_chrome_branded) { if (is_chromeos) { widevine_cdm_version_h_file = - "chromeos/$widevine_arch/widevine_cdm_version.h" - widevine_cdm_binary_files = [ - "chromeos/$widevine_arch/libwidevinecdm.so", - ] + "chromeos/$widevine_arch/widevine_cdm_version.h" + widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] } else if (is_linux) { - widevine_cdm_version_h_file = - "linux/$widevine_arch/widevine_cdm_version.h" - widevine_cdm_binary_files = [ - "linux/$widevine_arch/libwidevinecdm.so", - ] + widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" + widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ] } else if (is_win) { - widevine_cdm_version_h_file = - "win/$widevine_arch/widevine_cdm_version.h" + widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" widevine_cdm_binary_files = [ "win/$widevine_arch/widevinecdm.dll", "win/$widevine_arch/widevinecdm.dll.lib", ] } else if (is_mac) { - widevine_cdm_version_h_file = - "mac/$widevine_arch/widevine_cdm_version.h" - widevine_cdm_binary_files = [ - "mac/$widevine_arch/libwidevinecdm.dylib", - ] + widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" + widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] } else { # Other platforms, use the default one. widevine_cdm_version_h_file = "widevine_cdm_version.h" @@ -50,7 +41,10 @@ if (is_android) { # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h copy("version_h") { - sources = [ widevine_cdm_version_h_file ] + sources = [ + widevine_cdm_version_h_file, + ] + # TODO(brettw) this should go into target_out_dir and callers should include # it from there. This requires, however, renaming the default # widevine_cdm_version.h in this directory to avoid conflicts. @@ -66,6 +60,7 @@ if (widevine_cdm_binary_files == []) { copy("binaries") { sources = widevine_cdm_binary_files outputs = [ "$root_out_dir/{{source_file_part}}" ] + # TODO(GYP) # 'COPY_PHASE_STRIP': 'NO', } @@ -77,12 +72,13 @@ source_set("adapter") { ":version_h", ":binaries", "//ppapi:ppapi_cpp", + #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) ] } if (is_linux) { - libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] + libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] } else if (is_win) { libs = [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] } else if (is_mac) { diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn index 700e745..3b2b884 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", diff --git a/third_party/yasm/yasm_assemble.gni b/third_party/yasm/yasm_assemble.gni index 48c9f8b..fdbf624 100644 --- a/third_party/yasm/yasm_assemble.gni +++ b/third_party/yasm/yasm_assemble.gni @@ -45,25 +45,29 @@ if (is_mac || is_ios) { if (cpu_arch == "x86") { _yasm_flags = [ "-fmacho32", - "-m", "x86", + "-m", + "x86", ] } else if (cpu_arch == "x64") { _yasm_flags = [ "-fmacho64", - "-m", "amd64", + "-m", + "amd64", ] } } else if (is_posix) { if (cpu_arch == "x86") { _yasm_flags = [ "-felf32", - "-m", "x86", + "-m", + "x86", ] } else if (cpu_arch == "x64") { _yasm_flags = [ "-DPIC", "-felf64", - "-m", "amd64", + "-m", + "amd64", ] } } else if (is_win) { @@ -71,12 +75,14 @@ if (is_mac || is_ios) { _yasm_flags = [ "-DPREFIX", "-fwin32", - "-m", "x86", + "-m", + "x86", ] } else if (cpu_arch == "x64") { _yasm_flags = [ "-fwin64", - "-m", "amd64", + "-m", + "amd64", ] } } @@ -114,12 +120,13 @@ template("yasm_assemble") { # (when cross-compiling). yasm_label = "//third_party/yasm($host_toolchain)" args = [ "./" + # Force current dir. - rebase_path(get_label_info(yasm_label, "root_out_dir") + "/yasm", - root_build_dir) - ] + rebase_path(get_label_info(yasm_label, "root_out_dir") + "/yasm", + root_build_dir) ] # Deps. - deps = [ yasm_label ] + deps = [ + yasm_label, + ] if (defined(invoker.deps)) { deps += invoker.deps } @@ -142,6 +149,7 @@ template("yasm_assemble") { # This goes to the end of include list. args += [ "-I.", + # Using "//." will produce a relative path "../.." which looks better than # "../../" which will result from using "//" as the base (although both # work). This is because rebase_path will terminate the result in a @@ -150,7 +158,6 @@ template("yasm_assemble") { "-I" + rebase_path(root_gen_dir, root_build_dir), ] - # Extra defines. if (defined(invoker.defines)) { foreach(def, invoker.defines) { @@ -167,8 +174,9 @@ template("yasm_assemble") { # "$root_out_dir/${target_name}.{{source_dir_part}}.$asm_obj_extension" outputs = [ "$target_out_dir/{{source_name_part}}.o" ] args += [ - "-o", rebase_path(outputs[0], root_build_dir), - "{{source}}" + "-o", + rebase_path(outputs[0], root_build_dir), + "{{source}}", ] # The wrapper script run_yasm will write the depfile to the same name as @@ -186,6 +194,8 @@ template("yasm_assemble") { sources = get_target_outputs(":$action_name") - deps = [ ":$action_name" ] + deps = [ + ":$action_name", + ] } } diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn index b4d9cfd..e49b5e9 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn @@ -8,12 +8,20 @@ config("zlib_config") { static_library("zlib_x86_simd") { if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) { - sources = [ "crc_folding.c", "fill_window_sse.c" ] + sources = [ + "crc_folding.c", + "fill_window_sse.c", + ] if (!is_win || is_clang) { - cflags = [ "-msse4.2", "-mpclmul" ] + cflags = [ + "-msse4.2", + "-mpclmul", + ] } } else { - sources = [ "simd_stub.c"] + sources = [ + "simd_stub.c", + ] } configs -= [ "//build/config/compiler:chromium_code" ] @@ -65,7 +73,9 @@ static_library("zlib") { configs += [ "//build/config/compiler:no_chromium_code" ] public_configs = [ ":zlib_config" ] - deps = [ ":zlib_x86_simd" ] + deps = [ + ":zlib_x86_simd", + ] } static_library("minizip") { @@ -97,7 +107,9 @@ static_library("minizip") { cflags = [ "-Wno-parentheses-equality" ] } - deps = [ ":zlib" ] + deps = [ + ":zlib", + ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] |