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

Unified Diff: build/config/BUILDCONFIG.gn

Issue 1285243004: Rename & rework is_chromeos (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Tweak desktop flag Created 5 years, 4 months 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 | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 706a439aa00c2f3e7e27a080a44af432341dbc4e..1c3fb30d21ef05999a9d76778a203b20c44ee04e 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -82,12 +82,16 @@ declare_args() {
# Compile for Thread Sanitizer to find threading bugs.
is_tsan = false
- if (current_os == "chromeos") {
- # Allows the target toolchain to be injected as arguments. This is needed
- # to support the CrOS build system which supports per-build-configuration
- # toolchains.
- cros_use_custom_toolchain = false
- }
+ # Used for compiling chromeos interface on linux OSes.
+ is_chromeos_ui = current_os == "chromeos"
+
+ # This controls some aspects fo being a traditional desktop linux
+ is_desktop_linux = current_os == "linux" && !is_chromeos_ui
+
+ # Allows the target toolchain to be injected as arguments. This is needed
+ # to support the CrOS build system which supports per-build-configuration
+ # toolchains.
+ cros_use_custom_toolchain = false
}
# =============================================================================
@@ -97,12 +101,15 @@ declare_args() {
# We set these various is_FOO booleans for convenience in writing OS-based
# conditions.
#
-# - is_android, is_chromeos, is_ios, and is_win should be obvious.
+# - is_android, is_ios, and is_win should be obvious.
# - is_mac is set only for desktop Mac. It is not set on iOS.
# - is_posix is true for mac and any Unix-like system (basically everything
# except Windows).
# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is
# generally too different despite being based on the Linux kernel).
+# - is_chromeos_os is true when compiling for a destination chromeos device.
+# - is_chromeos_ui is true when compiling for either a chromeos device or
+# debugging on desktop for the same.
#
# Do not add more is_* variants here for random lesser-used Unix systems like
# aix or one of the BSDs. If you need to check these, just check the os value
@@ -110,7 +117,7 @@ declare_args() {
if (current_os == "win") {
is_android = false
- is_chromeos = false
+ is_chromeos_os = false
is_ios = false
is_linux = false
is_mac = false
@@ -119,7 +126,7 @@ if (current_os == "win") {
is_win = true
} else if (current_os == "mac") {
is_android = false
- is_chromeos = false
+ is_chromeos_os = false
is_ios = false
is_linux = false
is_mac = true
@@ -128,7 +135,7 @@ if (current_os == "win") {
is_win = false
} else if (current_os == "android") {
is_android = true
- is_chromeos = false
+ is_chromeos_os = false
is_ios = false
is_linux = false
is_mac = false
@@ -137,7 +144,8 @@ if (current_os == "win") {
is_win = false
} else if (current_os == "chromeos") {
is_android = false
- is_chromeos = true
+ is_chromeos_ui = true
+ is_chromeos_os = true
is_ios = false
is_linux = true
is_mac = false
@@ -148,7 +156,7 @@ if (current_os == "win") {
# current_os == "nacl" will be passed by the nacl toolchain definition. It is not
# set by default or on the command line. We treat is as a Posix variant.
is_android = false
- is_chromeos = false
+ is_chromeos_os = false
is_ios = false
is_linux = false
is_mac = false
@@ -157,7 +165,7 @@ if (current_os == "win") {
is_win = false
} else if (current_os == "ios") {
is_android = false
- is_chromeos = false
+ is_chromeos_os = false
is_ios = true
is_linux = false
is_mac = false
@@ -166,7 +174,7 @@ if (current_os == "win") {
is_win = false
} else if (current_os == "linux") {
is_android = false
- is_chromeos = false
+ is_chromeos_os = false
is_ios = false
is_linux = true
is_mac = false
@@ -175,7 +183,6 @@ if (current_os == "win") {
is_win = false
}
-is_desktop_linux = is_linux && !is_chromeos
# =============================================================================
# CPU ARCHITECTURE
@@ -276,7 +283,7 @@ if (!is_android) {
"*\bandroid/*",
]
}
-if (!is_chromeos) {
+if (!is_chromeos_ui) {
sources_assignment_filter += [
"*_chromeos.h",
"*_chromeos.cc",
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698