summaryrefslogtreecommitdiffstats
path: root/chrome/version.gni
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 /chrome/version.gni
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}
Diffstat (limited to 'chrome/version.gni')
-rw-r--r--chrome/version.gni24
1 files changed, 20 insertions, 4 deletions
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",
+ ]
+ }
}