Make *some* version of the Win GN build work.
R=scottmg@chromium.org, brettw@chromium.org BUG=354261 Review URL: https://codereview.chromium.org/709593004 Cr-Commit-Position: refs/heads/master@{#303366}
This commit is contained in:
63
BUILD.gn
63
BUILD.gn
@ -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",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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",
|
||||
|
4
build/secondary/third_party/nss/BUILD.gn
vendored
4
build/secondary/third_party/nss/BUILD.gn
vendored
@ -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",
|
||||
|
@ -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 || !is_linux) {
|
||||
sources -= [
|
||||
"rsa_private_key_nss_unittest.cc",
|
||||
]
|
||||
}
|
||||
|
||||
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",
|
||||
]
|
||||
}
|
||||
|
||||
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") {
|
||||
|
8
third_party/zlib/BUILD.gn
vendored
8
third_party/zlib/BUILD.gn
vendored
@ -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" ]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user