diff options
-rw-r--r-- | BUILD.gn | 63 | ||||
-rw-r--r-- | base/allocator/BUILD.gn | 2 | ||||
-rw-r--r-- | build/config/allocator.gni | 5 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 25 | ||||
-rw-r--r-- | build/secondary/third_party/nss/BUILD.gn | 4 | ||||
-rw-r--r-- | crypto/BUILD.gn | 91 | ||||
-rw-r--r-- | third_party/zlib/BUILD.gn | 8 |
7 files changed, 144 insertions, 54 deletions
@@ -255,4 +255,67 @@ group("root") { "//device/usb", ] } + + if (is_win) { + # TODO(GYP): Make these work. + deps -= [ + "//apps", + "//ash", + "//chrome/browser", + "//chrome/browser/devtools", + "//chrome/common", + "//chrome/plugin", + "//chrome/renderer", + "//chrome/utility", + "//components:all_components", + "//cc", + "//cc/blink", + "//content", + "//content/shell:content_shell", + "//content/test:test_support", + "//device/bluetooth", + "//extensions/browser", + "//extensions/common", + "//extensions/common/api", + "//extensions/renderer", + "//gpu", + "//google_apis", + "//google_apis/gcm", + "//jingle:notifier", + "//media", + "//media/blink", + "//media/cast", + "//media/mojo", + "//mojo", + "//pdf", + "//ppapi:ppapi_c", + "//printing", + "//remoting/client/plugin", + "//sandbox", + "//storage/browser", + "//sync", + "//third_party/WebKit/public:all_blink", + "//third_party/angle:translator", + "//third_party/leveldatabase", + "//third_party/libjingle", + "//third_party/usrsctp", + "//third_party/webrtc", + "//ui/accessibility", + "//ui/app_list", + "//ui/aura", + "//ui/base", + "//ui/display", + "//ui/events", + "//ui/gfx", + "//ui/gl", + "//ui/keyboard", + "//ui/native_theme", + "//ui/snapshot", + "//ui/surface", + "//ui/views", + "//ui/views/controls/webview", + "//ui/web_dialogs", + "//ui/wm", + ] + } } diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn index 510c3d3..d9ff4c5 100644 --- a/base/allocator/BUILD.gn +++ b/base/allocator/BUILD.gn @@ -37,7 +37,7 @@ if (is_win) { } } -if (!is_android) { +if (use_allocator == "tcmalloc") { # tcmalloc currently won't compile on Android. source_set("tcmalloc") { tcmalloc_dir = "//third_party/tcmalloc/chromium" diff --git a/build/config/allocator.gni b/build/config/allocator.gni index acc21d1..2d2fed1 100644 --- a/build/config/allocator.gni +++ b/build/config/allocator.gni @@ -1,8 +1,9 @@ # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - -if (is_android || cpu_arch == "mipsel" || is_mac || is_asan) { + +# TODO(GYP): Make tcmalloc work on win. +if (is_android || cpu_arch == "mipsel" || is_mac || is_asan || is_win) { _default_allocator = "none" } else { _default_allocator = "tcmalloc" diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 3d1b341..088120d 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -918,15 +918,28 @@ config("optimize_max") { cflags = common_optimize_on_cflags ldflags = common_optimize_on_ldflags if (is_win) { + cflags -= [ + "/Os", + ] cflags += [ "/Ot", # Favor speed over size. - "/GL", # Whole program optimization. - # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. - # Probably anything that this would catch that wouldn't be caught in a - # normal build isn't going to actually be a bug, so the incremental value - # of C4702 for PGO builds is likely very small. - "/wd4702", ] + if (is_official_build) { + # TODO(GYP): TODO(dpranke): Should these only be on in an official + # build, or on all the time? For now we'll require official build so + # that the compile is clean. + cflags += [ + "/GL", # Whole program optimization. + # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. + # Probably anything that this would catch that wouldn't be caught in a + # normal build isn't going to actually be a bug, so the incremental + # value of C4702 for PGO builds is likely very small. + "/wd4702", + ] + ldflags += [ + "/LTCG", + ] + } } else { cflags += [ "-O2", diff --git a/build/secondary/third_party/nss/BUILD.gn b/build/secondary/third_party/nss/BUILD.gn index 30364d1..a285ca1 100644 --- a/build/secondary/third_party/nss/BUILD.gn +++ b/build/secondary/third_party/nss/BUILD.gn @@ -1159,6 +1159,10 @@ if (is_linux) { "USE_HW_AES", "INTEL_GCM", ] + sources -= [ + "nss/lib/freebl/mpi/mpi_amd64.c", + ] + } else if (cpu_arch == "x64") { sources -= [ "nss/lib/freebl/intel-aes-x86-masm.asm", diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn index d3d318d..f342af9 100644 --- a/crypto/BUILD.gn +++ b/crypto/BUILD.gn @@ -168,7 +168,9 @@ component("crypto") { defines = [ "CRYPTO_IMPLEMENTATION" ] } -if (is_win) { +# TODO(GYP): TODO(dpranke), fix the compile errors for this stuff +# and make it work. +if (false && is_win) { # A minimal crypto subset for hmac-related stuff that small standalone # targets can use to reduce code size on Windows. This does not depend on # OpenSSL/NSS but will use Windows APIs for that functionality. @@ -198,52 +200,55 @@ if (is_win) { } } -test("crypto_unittests") { - sources = [ - # Tests. - "curve25519_unittest.cc", - "ec_private_key_unittest.cc", - "ec_signature_creator_unittest.cc", - "encryptor_unittest.cc", - "ghash_unittest.cc", - "hkdf_unittest.cc", - "hmac_unittest.cc", - "nss_util_unittest.cc", - "openssl_bio_string_unittest.cc", - "p224_unittest.cc", - "p224_spake_unittest.cc", - "random_unittest.cc", - "rsa_private_key_unittest.cc", - "rsa_private_key_nss_unittest.cc", - "secure_hash_unittest.cc", - "sha2_unittest.cc", - "signature_creator_unittest.cc", - "signature_verifier_unittest.cc", - "symmetric_key_unittest.cc", - ] - - if (use_openssl || !is_linux) { - sources -= [ +# TODO(GYP): Make this link on win as well. +if (!is_win) { + test("crypto_unittests") { + sources = [ + # Tests. + "curve25519_unittest.cc", + "ec_private_key_unittest.cc", + "ec_signature_creator_unittest.cc", + "encryptor_unittest.cc", + "ghash_unittest.cc", + "hkdf_unittest.cc", + "hmac_unittest.cc", + "nss_util_unittest.cc", + "openssl_bio_string_unittest.cc", + "p224_unittest.cc", + "p224_spake_unittest.cc", + "random_unittest.cc", + "rsa_private_key_unittest.cc", "rsa_private_key_nss_unittest.cc", + "secure_hash_unittest.cc", + "sha2_unittest.cc", + "signature_creator_unittest.cc", + "signature_verifier_unittest.cc", + "symmetric_key_unittest.cc", ] - } - if (use_openssl) { - sources -= [ "nss_util_unittest.cc" ] - } else { - sources -= [ "openssl_bio_string_unittest.cc" ] - } + if (use_openssl || !is_linux) { + sources -= [ + "rsa_private_key_nss_unittest.cc", + ] + } - deps = [ - ":crypto", - ":platform", - ":test_support", - "//base", - "//base/test:run_all_unittests", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] + if (use_openssl) { + sources -= [ "nss_util_unittest.cc" ] + } else { + sources -= [ "openssl_bio_string_unittest.cc" ] + } + + deps = [ + ":crypto", + ":platform", + ":test_support", + "//base", + "//base/test:run_all_unittests", + "//base/test:test_support", + "//testing/gmock", + "//testing/gtest", + ] + } } source_set("test_support") { diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn index 18cf816..5dbec0f 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn @@ -7,11 +7,15 @@ config("zlib_config") { } static_library("zlib_x86_simd") { - if (cpu_arch == "x86" || cpu_arch == "x64") { + if (!is_win && (cpu_arch == "x86" || cpu_arch == "x64")) { sources = [ "crc_folding.c", "fill_window_sse.c" ] cflags = [ "-msse2", "-msse4.2", "-mpclmul" ] } else { sources = [ "simd_stub.c"] + if (is_win) { + # TODO(GYP): crbug.com/431462 disable warning about structure padding. + cflags = [ "/wd4324" ] + } } } @@ -52,7 +56,7 @@ static_library("zlib") { "zutil.h", ] - if (cpu_arch == "x86" || cpu_arch == "x64") { + if (!is_win && (cpu_arch == "x86" || cpu_arch == "x64")) { sources += [ "x86.c" ] } |