diff options
author | brettw <brettw@chromium.org> | 2015-02-19 15:17:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-19 23:18:14 +0000 |
commit | d1c719acf7db459016f425eb8018ec4208511578 (patch) | |
tree | f5604ba0055245c0133cd5747e8a70de99b917f7 /third_party | |
parent | 9ff250e0023b2f87e0fddd7eadbef7be3ecc3882 (diff) | |
download | chromium_src-d1c719acf7db459016f425eb8018ec4208511578.zip chromium_src-d1c719acf7db459016f425eb8018ec4208511578.tar.gz chromium_src-d1c719acf7db459016f425eb8018ec4208511578.tar.bz2 |
Update existing uses of /wd4267 to use the GN config
This is the size_t to integer conversion warning. Using the config prevents flag duplication and is clearer to read.
Minor updates to Win64 build, including some fixes for size_t to int conversions.
Review URL: https://codereview.chromium.org/929793006
Cr-Commit-Position: refs/heads/master@{#317162}
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/boringssl/BUILD.gn | 13 | ||||
-rw-r--r-- | third_party/cld/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/cld_2/BUILD.gn | 24 | ||||
-rw-r--r-- | third_party/harfbuzz-ng/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libexif/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libjingle/BUILD.gn | 9 | ||||
-rw-r--r-- | third_party/libpng/BUILD.gn | 8 | ||||
-rw-r--r-- | third_party/protobuf/BUILD.gn | 17 | ||||
-rw-r--r-- | third_party/re2/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/smhasher/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/snappy/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/sqlite/BUILD.gn | 4 | ||||
-rw-r--r-- | third_party/yasm/BUILD.gn | 6 |
13 files changed, 28 insertions, 71 deletions
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn index d245868..9c75f1b 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -52,7 +52,12 @@ component("boringssl") { } configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + # TODO(davidben): Fix size_t truncations in BoringSSL. + # https://crbug.com/429039 + "//build/config/compiler:no_size_t_to_int_warning", + ] # Also gets the include dirs from :openssl_config include_dirs = [ @@ -64,12 +69,6 @@ component("boringssl") { "src/crypto", ] - if (is_win) { - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - cflags += [ "/wd4267" ] - } - if (cpu_arch == "x64") { if (is_mac) { sources += gypi_values.boringssl_mac_x86_64_sources diff --git a/third_party/cld/BUILD.gn b/third_party/cld/BUILD.gn index ed4075d..7a0c0eb 100644 --- a/third_party/cld/BUILD.gn +++ b/third_party/cld/BUILD.gn @@ -102,7 +102,6 @@ source_set("cld") { "/wd4005", # Macro defined twice. "/wd4006", # #undef expected an identifier. "/wd4309", # Truncation of constant value. - "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int ] } else { defines = [ "COMPILER_GCC" ] diff --git a/third_party/cld_2/BUILD.gn b/third_party/cld_2/BUILD.gn index bede93a..8098eba 100644 --- a/third_party/cld_2/BUILD.gn +++ b/third_party/cld_2/BUILD.gn @@ -48,10 +48,6 @@ source_set("cld2_data") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - - if (is_win) { - cflags = [ "/wd4267" ] # size_t -> int conversion. - } } # As in the corresponding gyp file, this just builds the core interfaces for @@ -66,10 +62,6 @@ source_set("cld_2") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - - if (is_win) { - cflags = [ "/wd4267" ] # size_t -> int conversion. - } } source_set("cld2_platform_impl") { @@ -94,10 +86,6 @@ static_library("cld2_static") { ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - - if (is_win) { - cflags = [ "/wd4267" ] # size_t -> int conversion. - } } config("cld2_dynamic_mode_config") { @@ -114,13 +102,9 @@ static_library("cld2_dynamic") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ - "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config", + "//build/config/compiler:no_chromium_code", ] - - if (is_win) { - cflags = [ "/wd4267" ] # size_t -> int conversion. - } } # Does not build on Windows. @@ -144,12 +128,8 @@ if (!is_win) { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ - "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config", + "//build/config/compiler:no_chromium_code", ] - - if (is_win) { - cflags = [ "/wd4267" ] # size_t -> int conversion. - } } } diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn index 000a9cc..6e93e04 100644 --- a/third_party/harfbuzz-ng/BUILD.gn +++ b/third_party/harfbuzz-ng/BUILD.gn @@ -162,7 +162,6 @@ if (use_system_harfbuzz) { } if (is_win) { cflags += [ - "/wd4267", # size_t to 'type' converion. "/wd4334", # Result of 32-bit shift implicitly converted to 64 bits. ] } diff --git a/third_party/libexif/BUILD.gn b/third_party/libexif/BUILD.gn index b2b4fed..be8caf6 100644 --- a/third_party/libexif/BUILD.gn +++ b/third_party/libexif/BUILD.gn @@ -53,7 +53,6 @@ if (!is_linux || is_chromeos) { cflags = [ "/wd4018", # size/unsigned mismatch - "/wd4267", # size_t -> ExifLong truncation on amd64 ] # TODO(GYP): Handle /analyze switch, when it will be used in GN. diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn index 6357b92..fc13ff1 100644 --- a/third_party/libjingle/BUILD.gn +++ b/third_party/libjingle/BUILD.gn @@ -256,6 +256,10 @@ static_library("libjingle") { "$p2p_dir/base/constants.cc", "$p2p_dir/base/constants.h", ] + + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + public_deps = [ ":jingle_deps", ] @@ -266,10 +270,7 @@ static_library("libjingle") { # From libjingle_common.gypi's conditions list. if (is_win) { - cflags = [ - "/wd4005", - "/wd4267", - ] + cflags = [ "/wd4005" ] } configs += [ ":jingle_unexported_configs" ] diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn index 488ef43..787d4fa 100644 --- a/third_party/libpng/BUILD.gn +++ b/third_party/libpng/BUILD.gn @@ -52,12 +52,8 @@ source_set("libpng_sources") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - if (is_win) { - cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187 - - if (component_mode == "shared_library") { - defines = [ "PNG_BUILD_DLL" ] - } + if (is_win && is_component_build) { + defines = [ "PNG_BUILD_DLL" ] } public_configs = [ ":libpng_config" ] diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn index 1367d8a..6825f1e 100644 --- a/third_party/protobuf/BUILD.gn +++ b/third_party/protobuf/BUILD.gn @@ -17,11 +17,6 @@ config("protobuf_config") { "GOOGLE_PROTOBUF_NO_RTTI", "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", ] - - if (is_win) { - # TODO(jschuh): http://crbug.com/167187 size_t -> int. - cflags = [ "/wd4267" ] - } } if (component_mode == "shared_library") { @@ -98,7 +93,11 @@ component("protobuf_lite") { if (is_win) { configs -= [ "//build/config/win:lean_and_mean" ] } - public_configs = [ ":protobuf_config" ] + public_configs = [ + ":protobuf_config", + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + "//build/config/compiler:no_size_t_to_int_warning", + ] cflags = protobuf_lite_cflags @@ -177,7 +176,11 @@ source_set("protobuf_full") { if (is_win) { configs -= [ "//build/config/win:lean_and_mean" ] } - public_configs = [ ":protobuf_config" ] + public_configs = [ + ":protobuf_config", + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + "//build/config/compiler:no_size_t_to_int_warning", + ] cflags = protobuf_lite_cflags } diff --git a/third_party/re2/BUILD.gn b/third_party/re2/BUILD.gn index d022e4f..2bc130a 100644 --- a/third_party/re2/BUILD.gn +++ b/third_party/re2/BUILD.gn @@ -67,10 +67,7 @@ static_library("re2") { if (is_win) { include_dirs = [ "mswin" ] - cflags = [ - "/wd4267", # Conversion from size_t. - "/wd4722", # Destructor never terminates. - ] + cflags = [ "/wd4722" ] # Destructor never terminates. } else { sources -= [ "mswin/stdint.h" ] } diff --git a/third_party/smhasher/BUILD.gn b/third_party/smhasher/BUILD.gn index e1bbb5e..fd9088c 100644 --- a/third_party/smhasher/BUILD.gn +++ b/third_party/smhasher/BUILD.gn @@ -27,9 +27,4 @@ source_set("cityhash") { ] configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - - if (is_win) { - # TODO(jschuh): http://code.google.com/p/smhasher/issues/detail?id=19 - cflags = [ "/wd4267" ] - } } diff --git a/third_party/snappy/BUILD.gn b/third_party/snappy/BUILD.gn index 0f440a5..4af0e81 100644 --- a/third_party/snappy/BUILD.gn +++ b/third_party/snappy/BUILD.gn @@ -36,9 +36,4 @@ static_library("snappy") { # https://code.google.com/p/snappy/issues/detail?id=70 configs -= [ "//build/config/clang:extra_warnings" ] } - - if (is_win) { - # https://code.google.com/p/snappy/issues/detail?id=75 - cflags = [ "/wd4267" ] # Conversion from size_t to 'type'. - } } diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn index 6f301ca..62efc0a 100644 --- a/third_party/sqlite/BUILD.gn +++ b/third_party/sqlite/BUILD.gn @@ -65,9 +65,7 @@ source_set("sqlite") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] - if (is_win) { - cflags += [ "/wd4267" ] # Conversion from size_t to "type". - } else if (is_linux) { + if (is_linux) { cflags += [ # SQLite doesn"t believe in compiler warnings, # preferring testing. diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn index cd9b453..3c5215e 100644 --- a/third_party/yasm/BUILD.gn +++ b/third_party/yasm/BUILD.gn @@ -148,8 +148,6 @@ if (current_toolchain == host_toolchain) { # re2c is missing CLOSEVOP from one switch. if (is_posix) { cflags = [ "-Wno-switch" ] - } else if (is_win) { - cflags = [ "/wd4267" ] # size_t to int conversion. } } @@ -248,9 +246,7 @@ if (current_toolchain == host_toolchain) { # directory, but the gen_x86_insn.py script does not make this easy. include_dirs = [ yasm_gen_include_dir ] - if (is_win) { - cflags = [ "/wd4267" ] # size_t to int conversion. - } else { + if (!is_win) { cflags = [ "-ansi", "-pedantic", |