Chromium Code Reviews| Index: build/config/BUILDCONFIG.gn |
| diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn |
| index c91db167b34dcc8adcd98dab2e09835599b89727..493c5a53b50425b6b3a0023cf7885521c6b48388 100644 |
| --- a/build/config/BUILDCONFIG.gn |
| +++ b/build/config/BUILDCONFIG.gn |
| @@ -125,8 +125,11 @@ declare_args() { |
| # Debug build. |
| is_debug = true |
| + # Whether we're using a chromeos user interface. |
| + is_chromeos_ui = current_os == "chromeos" |
| + |
| # Whether we're a traditional desktop unix. |
| - is_desktop_linux = current_os == "linux" && current_os != "chromeos" |
| + is_desktop_linux = current_os == "linux" |
| # Set to true when compiling with the Clang compiler. Typically this is used |
| # to configure warnings. |
| @@ -145,12 +148,10 @@ 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 |
| - } |
| + # 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 |
|
Peter Mayo
2015/08/13 01:46:46
This change can be separated.
Peter Mayo
2015/08/13 02:07:38
Done. https://codereview.chromium.org/1287153002/
|
| # DON'T ADD MORE FLAGS HERE. Read the comment above. |
| } |
| @@ -162,7 +163,7 @@ 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_chromeos_os, 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). |
| @@ -176,7 +177,7 @@ declare_args() { |
| if (current_os == "win" || current_os == "winrt_81" || |
| current_os == "winrt_81_phone" || current_os == "winrt_10") { |
| is_android = false |
| - is_chromeos = false |
| + is_chromeos_os = false |
| is_ios = false |
| is_linux = false |
| is_mac = false |
| @@ -185,7 +186,7 @@ if (current_os == "win" || current_os == "winrt_81" || |
| 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 |
| @@ -194,7 +195,7 @@ if (current_os == "win" || current_os == "winrt_81" || |
| 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 |
| @@ -203,7 +204,8 @@ if (current_os == "win" || current_os == "winrt_81" || |
| is_win = false |
| } else if (current_os == "chromeos") { |
| is_android = false |
| - is_chromeos = true |
| + assert(is_chromeos_ui) |
|
Peter Mayo
2015/08/13 01:46:46
Provide message with assert.
Peter Mayo
2015/08/13 02:07:38
Done.
|
| + is_chromeos_os = true |
| is_ios = false |
| is_linux = true |
| is_mac = false |
| @@ -215,7 +217,7 @@ if (current_os == "win" || current_os == "winrt_81" || |
| # 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 |
| @@ -224,7 +226,7 @@ if (current_os == "win" || current_os == "winrt_81" || |
| 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 |
| @@ -233,7 +235,7 @@ if (current_os == "win" || current_os == "winrt_81" || |
| 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 |
| @@ -242,6 +244,10 @@ if (current_os == "win" || current_os == "winrt_81" || |
| is_win = false |
| } |
| +# This is for backwards compatability until the rename in complete in all |
| +# dependent files. |
| +is_chromeos = is_chromeos_ui |
| + |
| # ============================================================================= |
| # SOURCES FILTERS |
| # ============================================================================= |
| @@ -328,7 +334,7 @@ if (!is_android) { |
| "*\bandroid/*", |
| ] |
| } |
| -if (!is_chromeos) { |
| +if (!is_chromeos_ui) { |
| sources_assignment_filter += [ |
| "*_chromeos.h", |
| "*_chromeos.cc", |
| @@ -587,7 +593,7 @@ if (is_win) { |
| host_toolchain = "//build/toolchain/linux:$host_cpu" |
| set_default_toolchain("//build/toolchain/linux:$current_cpu") |
| } |
| - if (is_chromeos && cros_use_custom_toolchain) { |
| + if (cros_use_custom_toolchain) { |
|
Peter Mayo
2015/08/13 01:46:46
Part of second change.
|
| set_default_toolchain("//build/toolchain/cros:target") |
| } |
| } else if (is_mac) { |