summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-05-01 15:36:23 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-01 22:36:58 +0000
commit2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c (patch)
treef9a32a6b8de3cd777ba9078cebd63de62142fe5e
parent7fe661b47213d343058810597851e30eeb68ad8b (diff)
downloadchromium_src-2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c.zip
chromium_src-2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c.tar.gz
chromium_src-2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c.tar.bz2
Add a GN flag for the Windows multi-dll build.
The first pass of moving the other Chrome-specific build flags out of the root build config file and into the new one. This requires both ffmpeg and Blink changes to finish landing. Originally landed as https://codereview.chromium.org/1120803003/ TBR=scottmg@chromium.org TBR=ddorwin@chromium.org (widevine) CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg Review URL: https://codereview.chromium.org/1123433002 Cr-Commit-Position: refs/heads/master@{#327998}
-rw-r--r--build/config/BUILD.gn1
-rw-r--r--build/config/BUILDCONFIG.gn2
-rw-r--r--build/config/chrome_build.gni23
-rw-r--r--build/config/compiler/BUILD.gn1
-rw-r--r--build/config/features.gni1
-rw-r--r--build/config/mac/mac_sdk.gni2
-rw-r--r--build/config/sysroot.gni2
-rw-r--r--build/secondary/tools/grit/grit_rule.gni1
-rw-r--r--chrome/BUILD.gn76
-rw-r--r--chrome/app/resources/BUILD.gn1
-rw-r--r--chrome/browser/BUILD.gn1
-rw-r--r--chrome/browser/policy/BUILD.gn2
-rw-r--r--chrome/chrome_dll.gypi1
-rw-r--r--chrome/chrome_repack_locales.gni1
-rw-r--r--chrome/chrome_watcher/BUILD.gn1
-rw-r--r--chrome/common/BUILD.gn1
-rw-r--r--chrome/installer/util/BUILD.gn3
-rw-r--r--chrome/policy.gypi1
-rw-r--r--chrome/test/BUILD.gn27
-rw-r--r--chrome/version.gni24
-rw-r--r--chrome_elf/BUILD.gn1
-rw-r--r--components/policy/BUILD.gn3
-rw-r--r--content/app/BUILD.gn11
-rw-r--r--content/public/app/BUILD.gn7
-rw-r--r--content/test/BUILD.gn1
-rw-r--r--gpu/config/BUILD.gn1
-rw-r--r--media/cdm/ppapi/BUILD.gn8
-rw-r--r--remoting/remoting_version.gni2
-rw-r--r--remoting/webapp/build_template.gni1
-rw-r--r--third_party/adobe/flash/BUILD.gn2
-rw-r--r--third_party/harfbuzz-ng/BUILD.gn1
-rw-r--r--third_party/widevine/cdm/BUILD.gn1
-rw-r--r--tools/gn/docs/cookbook.md5
33 files changed, 148 insertions, 68 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 22cb45a..1bd666b 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/allocator.gni")
+import("//build/config/chrome_build.gni")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 455ec0d..2274c0e 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -66,11 +66,13 @@ declare_args() {
# Selects the desired build flavor. Official builds get additional
# processing to prepare for release. Normally you will want to develop and
# test with this flag off.
+ # TODO(brettw) move to chrome_build.gni when DEPS are updated.
is_official_build = false
# Select the desired branding flavor. False means normal Chromium branding,
# true means official Google Chrome branding (requires extra Google-internal
# resources).
+ # TODO(brettw) move to chrome_build.gni when DEPS are updated.
is_chrome_branded = false
# Compile for Address Sanitizer to find memory bugs.
diff --git a/build/config/chrome_build.gni b/build/config/chrome_build.gni
new file mode 100644
index 0000000..0a0d4fd
--- /dev/null
+++ b/build/config/chrome_build.gni
@@ -0,0 +1,23 @@
+# Copyright 2015 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.
+
+declare_args() {
+ # Selects the desired build flavor. Official builds get additional
+ # processing to prepare for release. Normally you will want to develop and
+ # test with this flag off.
+ # TODO(brettw) move here from BUILDCONFIG.gn when DEPS are updated.
+ #is_official_build = false
+
+ # Select the desired branding flavor. False means normal Chromium branding,
+ # true means official Google Chrome branding (requires extra Google-internal
+ # resources).
+ # TODO(brettw) move here from BUILDCONFIG.gn when DEPS are updated.
+ #is_chrome_branded = false
+
+ # Break chrome.dll into multple pieces based on process type. Only available
+ # on Windows.
+ # TODO(brettw) make this work. When it does, the declaration should be:
+ #is_multi_dll_chrome = is_win && !is_component_build
+ is_multi_dll_chrome = false
+}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index c217154..95e09d9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/android/config.gni")
+import("//build/config/chrome_build.gni")
if (current_cpu == "arm") {
import("//build/config/arm.gni")
}
diff --git a/build/config/features.gni b/build/config/features.gni
index 3f63773..661170e 100644
--- a/build/config/features.gni
+++ b/build/config/features.gni
@@ -11,6 +11,7 @@
#
# See also build/config/ui.gni
+import("//build/config/chrome_build.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni
index 44995a3..600085e 100644
--- a/build/config/mac/mac_sdk.gni
+++ b/build/config/mac/mac_sdk.gni
@@ -2,6 +2,8 @@
# 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")
+
declare_args() {
# Minimum supported version of the Mac SDK.
mac_sdk_min = "10.6"
diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
index 057971d..e5a9c2b 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -5,6 +5,8 @@
# This header file defines the "sysroot" variable which is the absolute path
# of the sysroot. If no sysroot applies, the variable will be an empty string.
+import("//build/config/chrome_build.gni")
+
declare_args() {
# The absolute path of the sysroot that is applied when compiling using
# the target toolchain.
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index 09a04c1..35bbed3 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -75,6 +75,7 @@
# # You can also put deps here if the grit source depends on generated
# # files.
# }
+import("//build/config/chrome_build.gni")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 0ab9496..e3b3d1f 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/features.gni")
import("//build/config/locales.gni")
import("//build/config/ui.gni")
@@ -24,7 +25,7 @@ if (!is_android) {
]
defines = []
deps = []
- datadeps = []
+ data_deps = []
# TODO(GYP) mac_bundle_resources, xcode_settings
@@ -32,7 +33,6 @@ if (!is_android) {
if (is_win) {
sources += [
- "$target_gen_dir/chrome_exe_version.rc",
"//content/app/startup_helper_win.cc",
"//content/public/common/content_switches.cc",
"app/chrome_crash_reporter_client.cc",
@@ -60,7 +60,7 @@ if (!is_android) {
}
deps += [
- ":chrome_version_resources",
+ ":chrome_exe_version",
":image_pre_reader",
":main_dll",
@@ -145,17 +145,22 @@ if (!is_android) {
"//third_party/adobe/flash:flapper_binaries",
"//third_party/widevine/cdm:widevinecdmadapter",
]
- # TODO(GYP) some stuff from GYP including chrome_multiple_dll.
}
if (is_linux && enable_plugins) {
deps += [ "//pdf" ]
}
+
+ if (is_multi_dll_chrome) {
+ defines += [ "CHROME_MULTIPLE_DLL" ]
+ data_deps += [ ":chrome_child" ]
+ }
}
} # !is_android
shared_library("main_dll") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ defines = []
deps = [
":browser_dependencies",
@@ -165,7 +170,6 @@ shared_library("main_dll") {
output_name = "chrome"
sources = [
- "$root_gen_dir/base/trace_event/etw_manifest/chrome_events_win.rc",
"//base/win/dllmain.cc",
"app/chrome_command_ids.h",
"app/chrome_dll.rc",
@@ -180,9 +184,7 @@ shared_library("main_dll") {
]
deps += [
- # On Windows, link the dependencies (libraries) that make up actual
- # Chromium functionality into this .dll.
- ":chrome_version_resources",
+ ":chrome_dll_version",
"//base/trace_event/etw_manifest:chrome_events_win",
"//chrome/app/theme:chrome_unscaled_resources",
"//chrome_elf",
@@ -214,8 +216,7 @@ shared_library("main_dll") {
deps += [ "//ui/compositor" ]
}
- #TODO(GYP) add chrome_multiple_dll support
- if (false) { #chrome_multiple_dll) {
+ if (is_multi_dll_chrome) {
defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
deps += [ "//content/public/app:browser" ]
} else {
@@ -236,11 +237,55 @@ shared_library("main_dll") {
# TODO(GYP) Lots of other stuff in the OS=="mac" block.
}
- if (enable_plugins) {
+ if (enable_plugins && !is_multi_dll_chrome) {
deps += [ "//pdf" ]
}
}
+if (is_multi_dll_chrome) {
+ shared_library("chrome_child") {
+ sources = [
+ "app/chrome_main.cc",
+ "app/chrome_main_delegate.cc",
+ "app/chrome_main_delegate.h",
+ "app/close_handle_hook_win.cc",
+ "app/close_handle_hook_win.h",
+ ]
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
+
+ deps = [
+ ":child_dependencies",
+ ":chrome_dll_version",
+ "//chrome/browser/policy:path_parser",
+ "//content/public/app:child",
+ ]
+
+ if (is_win) {
+ deps += [ "//chrome_elf" ]
+ # TODO(GYP): PGO on Windows.
+ # ['chrome_pgo_phase==1', {
+ # 'msvs_settings': {
+ # 'VCLinkerTool': {
+ # 'LinkTimeCodeGeneration': '2',
+ # },
+ # },
+ # }],
+ # ['chrome_pgo_phase==2', {
+ # 'msvs_settings': {
+ # 'VCLinkerTool': {
+ # 'LinkTimeCodeGeneration': '3',
+ # },
+ # },
+ # }],
+ }
+ if (enable_plugins) {
+ deps += [ "//pdf" ]
+ }
+ }
+}
+
# GYP version: chromium_browser_dependencies variable in chrome.gyp
group("browser_dependencies") {
deps = [
@@ -334,15 +379,6 @@ if (is_win) {
output = "$target_gen_dir/other_version.rc"
}
- group("chrome_version_resources") {
- deps = [
- ":chrome_exe_version",
- ":chrome_dll_version",
- ":nacl64_exe_version",
- ":other_version",
- ]
- }
-
source_set("image_pre_reader") {
sources = [
"app/image_pre_reader_win.cc",
diff --git a/chrome/app/resources/BUILD.gn b/chrome/app/resources/BUILD.gn
index 854fda7..97323f1 100644
--- a/chrome/app/resources/BUILD.gn
+++ b/chrome/app/resources/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//tools/grit/grit_rule.gni")
# GYP version: chrome/chrome_resources.gyp:chrome_strings
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 9bb4270..fc384b7 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
diff --git a/chrome/browser/policy/BUILD.gn b/chrome/browser/policy/BUILD.gn
index 6a645e7..e3b8e91 100644
--- a/chrome/browser/policy/BUILD.gn
+++ b/chrome/browser/policy/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("path_parser") {
+source_set("path_parser") {
sources = [
"policy_path_parser.h",
"policy_path_parser_linux.cc",
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index b9a9973..94a61a6 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -326,6 +326,7 @@
['chrome_multiple_dll', {
'targets': [
{
+ # GN version: //chrome:chrome_child
'target_name': 'chrome_child_dll',
'type': 'shared_library',
'product_name': 'chrome_child',
diff --git a/chrome/chrome_repack_locales.gni b/chrome/chrome_repack_locales.gni
index ea9b432..d19888c 100644
--- a/chrome/chrome_repack_locales.gni
+++ b/chrome/chrome_repack_locales.gni
@@ -2,6 +2,7 @@
# 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")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//tools/grit/repack.gni")
diff --git a/chrome/chrome_watcher/BUILD.gn b/chrome/chrome_watcher/BUILD.gn
index 1a67b22..ada2808 100644
--- a/chrome/chrome_watcher/BUILD.gn
+++ b/chrome/chrome_watcher/BUILD.gn
@@ -23,7 +23,6 @@ process_version("chrome_watcher_resources") {
shared_library("chrome_watcher") {
sources = [
- "$target_gen_dir/chrome_watcher_version.rc",
"chrome_watcher_main.cc",
]
inputs = [
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 7de5abb..1985599 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -277,7 +277,6 @@ static_library("constants") {
"widevine_cdm_constants.cc",
"widevine_cdm_constants.h",
]
- sources += get_target_outputs(":make_chrome_version")
deps = [
":make_chrome_version",
diff --git a/chrome/installer/util/BUILD.gn b/chrome/installer/util/BUILD.gn
index 4351912..e923633 100644
--- a/chrome/installer/util/BUILD.gn
+++ b/chrome/installer/util/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//testing/test.gni")
static_library("util") {
@@ -261,7 +262,7 @@ if (is_win) {
"//base",
"//base:i18n",
"//base/test:test_support",
- "//chrome:chrome_version_resources",
+ "//chrome:other_version",
"//chrome/installer/test:alternate_version_generator_lib",
"//content/public/common",
"//testing/gmock",
diff --git a/chrome/policy.gypi b/chrome/policy.gypi
index 79cc543..6d81c9c 100644
--- a/chrome/policy.gypi
+++ b/chrome/policy.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //chrome/browser/policy:path_parser
'target_name': 'policy_path_parser',
'type': 'static_library',
'dependencies': [
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 7379841..fcb383a 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
@@ -373,9 +374,8 @@ if (!is_android) {
chrome_tests_gypi_values.chrome_interactive_ui_test_win_sources,
".",
"//chrome")
- sources += [ "$root_gen_dir/chrome/other_version.rc" ]
deps += [
- "//chrome:chrome_version_resources",
+ "//chrome:other_version",
"//third_party/isimpledom",
"//third_party/wtl",
"//ui/resources",
@@ -846,9 +846,8 @@ if (!is_android) {
]
}
if (is_win) {
- sources += [ "$root_gen_dir/chrome/other_version.rc" ]
deps += [
- "//chrome:chrome_version_resources",
+ "//chrome:other_version",
"//third_party/wtl",
"//ui/resources",
]
@@ -1070,9 +1069,8 @@ if (!is_android) {
ldflags = [ "-Wl,-ObjC" ]
}
if (is_win) {
- sources += [ "$root_gen_dir/chrome/other_version.rc" ]
deps += [
- "//chrome:chrome_version_resources",
+ "//chrome:other_version",
"//third_party/wtl",
"//ui/resources",
]
@@ -1139,9 +1137,9 @@ if (!is_android) {
ldflags = [ "-Wl,-ObjC" ]
}
if (is_win) {
- sources += [ "$root_gen_dir/chrome/other_version.rc" ]
deps += [
- "//chrome:chrome_version_resources",
+ "//chrome:other_version",
+ "//chrome/installer/util:strings",
"//third_party/wtl",
"//ui/resources",
]
@@ -1596,25 +1594,16 @@ if (!is_android) {
sources += rebase_path(unit_gypi_values.chrome_unit_tests_win_sources,
".",
"//chrome")
- sources += [
- # TODO: It would be nice to have these pulled in
- # automatically from direct_dependent_settings in
- # their various targets (net.gyp:net_resources, etc.),
- # but that causes errors in other targets when
- # resulting .res files get referenced multiple times.
- #'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', TODO(GYP)
- #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
- ]
-
deps += [
#'browser/safe_browsing/incident_reporting/verifier_test/verifier_unittest.gyp:verifier_test_dll_1', TODO(GYP)
#'browser/safe_browsing/incident_reporting/verifier_test/verifier_unittest.gyp:verifier_test_dll_2', TODO(GYP)
- #'chrome_version_resources', TODO(GYP)
+ "//chrome:other_version",
"//chrome_elf:blacklist_test_dll_1",
"//chrome/installer/util:strings",
"//third_party/iaccessible2",
"//third_party/isimpledom",
"//third_party/wtl",
+ "//ui/resources",
]
configs -= [ "//build/config/win:default_incremental_linking" ]
diff --git a/chrome/version.gni b/chrome/version.gni
index b956e9c..1d424a6 100644
--- a/chrome/version.gni
+++ b/chrome/version.gni
@@ -2,10 +2,15 @@
# 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")
+
# Runs the version processing script over the given template file to produce
# an output file. This is used for generating various forms of files that
# incorporate the product name and version.
#
+# Unlike GYP, this will actually compile the resulting file, so you don't need
+# to add it separately to the sources, just depend on the target.
+#
# This template automatically includes VERSION, LASTCHANGE, and BRANDING. It
# automatically uses the template file .
# GYP parameterizes this template file but all current invocations use this
@@ -50,10 +55,11 @@ template("process_version") {
"Either sources or template_file must be defined for $target_name")
assert(defined(invoker.output), "Output must be defined for $target_name")
- action(target_name) {
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
+ action_name = target_name + "_action"
+ source_set_name = target_name
+
+ action(action_name) {
+ visibility = [ ":$source_set_name" ]
script = "//build/util/version.py"
lastchange_path = "//build/util/LASTCHANGE"
@@ -108,4 +114,14 @@ template("process_version") {
rebase_path(invoker.output, root_build_dir),
]
}
+
+ source_set(source_set_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ sources = get_target_outputs(":$action_name")
+ deps = [
+ ":$action_name",
+ ]
+ }
}
diff --git a/chrome_elf/BUILD.gn b/chrome_elf/BUILD.gn
index 06cb937..ee00fa8 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -14,7 +14,6 @@ process_version("chrome_elf_resources") {
shared_library("chrome_elf") {
sources = [
- "$target_gen_dir/chrome_elf_version.rc",
"chrome_elf_main.cc",
"chrome_elf_main.h",
]
diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
index b373cc3..f80c492 100644
--- a/components/policy/BUILD.gn
+++ b/components/policy/BUILD.gn
@@ -2,8 +2,9 @@
# 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")
import("//build/config/features.gni")
-import("resources/policy_templates.gni")
+import("//components/policy/resources/policy_templates.gni")
import("//third_party/protobuf/proto_library.gni")
import("//tools/grit/grit_rule.gni")
diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn
index f6c72b9..8da75d4 100644
--- a/content/app/BUILD.gn
+++ b/content/app/BUILD.gn
@@ -2,8 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# TODO(GYP) enable chrome_multiple_dll support
-is_chrome_multiple_dll = false
+import("//build/config/chrome_build.gni")
content_app_sources = [
"android/app_jni_registrar.cc",
@@ -71,7 +70,7 @@ content_app_extra_configs = [
"//content:content_implementation",
]
-if (!is_chrome_multiple_dll) {
+if (!is_multi_dll_chrome) {
content_app_deps += [ "//content/gpu:gpu_sources" ]
}
@@ -86,7 +85,7 @@ source_set("both") {
deps = content_app_deps
}
-if (is_chrome_multiple_dll) {
+if (is_multi_dll_chrome) {
# It doesn't make sense to do the browser/child dll split in component mode.
assert(!is_component_build)
@@ -97,7 +96,7 @@ if (is_chrome_multiple_dll) {
configs += content_app_extra_configs
deps = content_app_deps
- defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
+ defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
}
source_set("child") {
@@ -107,6 +106,6 @@ if (is_chrome_multiple_dll) {
configs += content_app_extra_configs
deps = content_app_deps
- defines += [ "CHROME_MULTIPLE_DLL_CHILD" ]
+ defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
}
}
diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn
index 20ee710..d75b59e 100644
--- a/content/public/app/BUILD.gn
+++ b/content/public/app/BUILD.gn
@@ -20,6 +20,8 @@
# //content (shared library) ->
# //content/public/app:both_sources (source set)
+import("//build/config/chrome_build.gni")
+
public_app_shared_sources = [
"content_jni_onload.h",
"content_main.h",
@@ -91,10 +93,7 @@ if (is_component_build) {
]
}
- # TODO(GYP) enable chrome_multiple_dll support
- is_chrome_multiple_dll = false
-
- if (is_chrome_multiple_dll) {
+ if (is_multi_dll_chrome) {
source_set("browser") {
check_includes = false # See comment above.
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 1089166..c0f3e8f 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn
index 0a2c135..1300cca 100644
--- a/gpu/config/BUILD.gn
+++ b/gpu/config/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/ui.gni")
declare_args() {
diff --git a/media/cdm/ppapi/BUILD.gn b/media/cdm/ppapi/BUILD.gn
index 5b8339b..585e6bf 100644
--- a/media/cdm/ppapi/BUILD.gn
+++ b/media/cdm/ppapi/BUILD.gn
@@ -49,22 +49,16 @@ shared_library("clearkeycdm") {
# TODO(GYP) on Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
}
-clearkeycdmadapter_rc_file = "$target_gen_dir/clearkeycdmadapter_version.rc"
-
process_version("clearkeycdmadapter_resources") {
visibility = [ ":*" ]
sources = [
"//media/clearkeycdmadapter.ver",
"external_clear_key/BRANDING",
]
- output = clearkeycdmadapter_rc_file
+ output = "$target_gen_dir/clearkeycdmadapter_version.rc"
}
cdm_adapter("clearkeycdmadapter") {
- sources = [
- clearkeycdmadapter_rc_file,
- ]
-
# Check whether the plugin's origin URL is valid.
defines = [ "CHECK_DOCUMENT_URL" ]
deps = [
diff --git a/remoting/remoting_version.gni b/remoting/remoting_version.gni
index f8f6276..cb8fb659 100644
--- a/remoting/remoting_version.gni
+++ b/remoting/remoting_version.gni
@@ -2,6 +2,8 @@
# 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")
+
_version_py_abspath = "//build/util/version.py"
_remoting_version_abspath = "//remoting/VERSION"
_chrome_version_abspath = "//chrome/VERSION"
diff --git a/remoting/webapp/build_template.gni b/remoting/webapp/build_template.gni
index 70ff555..5d4233c 100644
--- a/remoting/webapp/build_template.gni
+++ b/remoting/webapp/build_template.gni
@@ -4,6 +4,7 @@
# Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi.
+import("//build/config/chrome_build.gni")
import("//remoting/remoting_locales.gni")
import("//remoting/remoting_options.gni")
import("//remoting/remoting_version.gni")
diff --git a/third_party/adobe/flash/BUILD.gn b/third_party/adobe/flash/BUILD.gn
index 7a5c99a..6a15c0b 100644
--- a/third_party/adobe/flash/BUILD.gn
+++ b/third_party/adobe/flash/BUILD.gn
@@ -2,6 +2,8 @@
# 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")
+
if (is_chrome_branded) {
if (is_linux && current_cpu == "x86") {
flapper_version_h_file = "symbols/ppapi/linux/flapper_version.h"
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
index b370348..ac22155 100644
--- a/third_party/harfbuzz-ng/BUILD.gn
+++ b/third_party/harfbuzz-ng/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/linux/pkg_config.gni")
# The GYP build supports system harfbuzz for non-official builds when using
diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn
index 10a61b9..62dad95 100644
--- a/third_party/widevine/cdm/BUILD.gn
+++ b/third_party/widevine/cdm/BUILD.gn
@@ -2,6 +2,7 @@
# 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")
import("//build/config/features.gni")
import("//chrome/version.gni") # TODO layering violation
import("//media/cdm/ppapi/cdm_adapter.gni")
diff --git a/tools/gn/docs/cookbook.md b/tools/gn/docs/cookbook.md
index 2337b83..57df03c 100644
--- a/tools/gn/docs/cookbook.md
+++ b/tools/gn/docs/cookbook.md
@@ -167,10 +167,11 @@ places are noted in the table below.
| `arm_neon_optional` (0/1) | `arm_optionally_use_neon` (true/false) | `//build/config/arm.gni` |
| `arm_version` | `arm_version` | `//build/config/arm.gni` |
| `asan` (0/1) | `is_asan` (true/false) | (global) |
-| `branding` ("Chromium"/"Chrome"") | `is_chrome_branded` (true/false) | (global) |
+| `branding` ("Chromium"/"Chrome"") | `is_chrome_branded` (true/false) | `//build/config/chrome_build.gni` |
| `build_for_tool=="drmemory"` | `disable_iterator_debugging` (true/false) | (internal to `//build/config/BUILD.gn`) |
| `build_for_tool=="tsan"` | `disable_iterator_debugging` (true/false) | (internal to `//build/config/BUILD.gn`) |
-| `buildtype` ("Official"/"Dev") | `is_official_build` (true/false) | (global) |
+| `buildtype` ("Official"/"Dev") | `is_official_build` (true/false) | `//build/config/chrome_build.gni` |
+| `chrome_multiple_dll` (0/1) | `is_multi_dll_chrome` (true/false) | `//build/config/chrome_build.gni` |
| `clang` (0/1) | `is_clang` (true/false) | (global) |
| `clang_use_chrome_plugins` (0/1) | `clang_use_chrome_plugins` (true/false) | (internal to `//build/config/clang/BUILD.gn`) |
| `component` ("shared_library"/"static_library") | `is_component_build` (true/false) | (global) |