Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: build/config/chromecast_build.gni

Issue 1528533002: [Chromecast] Replace architecure-based conditionals with flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Correct declare_args bug. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | chromecast/BUILD.gn » ('j') | chromecast/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/chromecast_build.gni
diff --git a/build/config/chromecast_build.gni b/build/config/chromecast_build.gni
index b3d1bc23bafc99561f27f5239a2782a845757421..b2259704983060e0b24006efedeceb12b60e947f 100644
--- a/build/config/chromecast_build.gni
+++ b/build/config/chromecast_build.gni
@@ -2,8 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This block should only contain Chromecast-specific build arguments used by
-# by components outside of //chromecast.
+# The args declared in this file should be referenced by components outside of
+# //chromecast. Args needed only in //chromecast should be declared in
+# //chromecast/chromecast.gni.
declare_args() {
# Set this true for a Chromecast build. Chromecast builds are supported on
# Linux and Android.
@@ -13,9 +14,23 @@ declare_args() {
disable_display = false
}
+# Note(slan): This arg depends on the value of is_chromecast, and thus must be
+# declared in a separate block. These blocks can be combined when/if
+# crbug.com/542846 is resolved.
+declare_args() {
+ # True if Chromecast build is targeted for linux desktop. This type of build
+ # is useful for testing and development, but currently supports only a subset
+ # of Cast functionality. Though this defaults to true for x86 Linux devices,
+ # this should be overriden manually for an embedded x86 build.
+ # TODO(slan): Remove instances of this when x86 is a fully supported platform.
+ is_cast_desktop_build = is_chromecast && target_os == "linux" &&
+ (target_cpu == "x86" || target_cpu == "x64")
+}
+
# Assert that Chromecast is being built for a supported platform.
assert(is_linux || is_android || !is_chromecast,
"Chromecast builds are not supported on $target_os")
-# Assert that disable_display is not true on a non-Chromecast build.
-assert(!disable_display || is_chromecast)
+# Assert that disable_display and is_cast_desktop_build are both false on a
+# non-Chromecast build.
+assert(is_chromecast || !(disable_display || is_cast_desktop_build))
« no previous file with comments | « build/common.gypi ('k') | chromecast/BUILD.gn » ('j') | chromecast/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698