summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi2
-rw-r--r--build/config/BUILD.gn16
-rw-r--r--build/config/compiler/BUILD.gn13
-rw-r--r--build/config/features.gni6
-rw-r--r--components/autofill/content/browser/BUILD.gn2
-rw-r--r--components/autofill/core/browser/BUILD.gn16
-rw-r--r--third_party/BUILD.gn2
7 files changed, 51 insertions, 6 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 5cab295..1306666 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2934,6 +2934,8 @@
'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
}],
['enable_prod_wallet_service==1', {
+ # In GN, this is set on the autofill tagets only. See
+ # //components/autofill/core/browser:wallet_service
'defines': ['ENABLE_PROD_WALLET_SERVICE=1'],
}],
['enable_background==1', {
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 3857648..44c87eb 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -42,9 +42,7 @@ declare_args() {
# For now we define these globally to match the current GYP build.
config("feature_flags") {
# TODO(brettw) this probably needs to be parameterized.
- defines = [
- "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere.
- ]
+ defines = [ "V8_DEPRECATION_WARNINGS" ] # Don't use deprecated V8 APIs anywhere.
if (cld_version > 0) {
defines += [ "CLD_VERSION=$cld_version" ]
@@ -278,6 +276,18 @@ config("debug") {
config("release") {
defines = [ "NDEBUG" ]
+
+ # Sanitizers.
+ # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this
+ # condition. When Valgrind is set up, we need to do the same here.
+ if (!is_tsan) {
+ defines += [ "NVALGRIND" ]
+ if (!is_nacl) {
+ # NaCl always enables dynamic annotations. Currently this value is set to
+ # 1 for all .nexes.
+ defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ]
+ }
+ }
}
# Default libraries ------------------------------------------------------------
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9ebb2e7..0e28e7d 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -336,6 +336,7 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
+ defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
}
@@ -636,6 +637,18 @@ config("chromium_code") {
"__STDC_CONSTANT_MACROS",
"__STDC_FORMAT_MACROS",
]
+
+ if (using_sanitizer) {
+ # _FORTIFY_SOURCE isn't really supported by Clang now, see
+ # http://llvm.org/bugs/show_bug.cgi?id=16821.
+ # It seems to work fine with Ubuntu 12 headers though, so use it in
+ # official builds.
+ #
+ # Non-chromium code is not guaranteed to compile cleanly with
+ # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+ # disabled, so only do that for Release build.
+ defines += [ "_FORTIFY_SOURCE=2" ]
+ }
}
}
config("no_chromium_code") {
diff --git a/build/config/features.gni b/build/config/features.gni
index 3873458..74f61cd 100644
--- a/build/config/features.gni
+++ b/build/config/features.gni
@@ -51,7 +51,11 @@ declare_args() {
enable_media_router = !is_ios && !is_android
# Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3.
- proprietary_codecs = false
+ # Android OS includes support for proprietary codecs regardless of building
+ # Chromium or Google Chrome. We also ship Google Chrome and Chromecast with
+ # proprietary codecs.
+ # TODO(GYP) The GYP build has || chromecast==1 for this:
+ proprietary_codecs = is_android || is_chrome_branded
enable_configuration_policy = true
diff --git a/components/autofill/content/browser/BUILD.gn b/components/autofill/content/browser/BUILD.gn
index 9f00418..9238aae 100644
--- a/components/autofill/content/browser/BUILD.gn
+++ b/components/autofill/content/browser/BUILD.gn
@@ -38,6 +38,8 @@ static_library("browser") {
"wallet/wallet_signin_helper.h",
]
+ configs += [ "//components/autofill/core/browser:wallet_service" ]
+
public_deps = [
"//skia",
]
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn
index 2d4c79e..342d0aa 100644
--- a/components/autofill/core/browser/BUILD.gn
+++ b/components/autofill/core/browser/BUILD.gn
@@ -2,6 +2,17 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/chrome_build.gni")
+
+# This config sets the define that controls which Wallet service to contact
+# for features using Wallet integration. Unofficial builds won't have the
+# proper API keys so it uses the "sandbox" test servers instead.
+config("wallet_service") {
+ if (is_official_build) {
+ defines = [ "ENABLE_PROD_WALLET_SERVICE=1" ]
+ }
+}
+
# GYP version: components/autofill.gyp:autofill_core_browser
static_library("browser") {
sources = [
@@ -148,7 +159,10 @@ static_library("browser") {
"//url",
]
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+ configs += [
+ ":wallet_service",
+ "//build/config/compiler:no_size_t_to_int_warning",
+ ]
if (is_mac) {
libs = [ "AddressBook.framework" ]
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 261cb1f..1876f0a8 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -20,7 +20,7 @@ config("system_libjpeg_config") {
}
config("libjpeg_turbo_config") {
- defines = [ "USE_LIBJPEG_TURBO" ]
+ defines = [ "USE_LIBJPEG_TURBO=1" ]
}
# This is a meta target that forwards to the system's libjpeg,