Commit bdd98b03 authored by Yuta Hijikata's avatar Yuta Hijikata Committed by Commit Bot

LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_CHROMEOS_ASH)

The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with is_ash
with some special cases (For those cases please refer to
http://go/lacros-macros).

The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.

Bug: 1052397
Change-Id: I4496e16926e171cbaa4bc68b92d39490a07c1cf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531811
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#828635}
parent 3bfd83b0
...@@ -48,21 +48,21 @@ if (is_chrome_branded) { ...@@ -48,21 +48,21 @@ if (is_chrome_branded) {
] ]
} }
if (is_chromeos) { if (is_chromeos_ash) {
grit_defines += [ grit_defines += [
"-D", "-D",
"chromeos", "chromeos",
] ]
} }
if (chromeos_is_browser_only) { if (is_chromeos_lacros) {
grit_defines += [ grit_defines += [
"-D", "-D",
"lacros", "lacros",
] ]
} }
if (is_linux) { if (is_linux || is_chromeos_lacros) {
grit_defines += [ grit_defines += [
"-D", "-D",
"desktop_linux", "desktop_linux",
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/sanitizers/sanitizers.gni") import("//build/config/sanitizers/sanitizers.gni")
executable("ipc_fuzzer") { executable("ipc_fuzzer") {
...@@ -24,7 +25,7 @@ executable("ipc_fuzzer") { ...@@ -24,7 +25,7 @@ executable("ipc_fuzzer") {
"//tools/ipc_fuzzer/message_lib:ipc_message_lib", "//tools/ipc_fuzzer/message_lib:ipc_message_lib",
] ]
public_deps = [ "//ipc" ] public_deps = [ "//ipc" ]
if (is_asan && is_chromeos) { if (is_asan && is_chromeos_ash) {
# Compiling fuzzer.cc with ASan takes too long, see # Compiling fuzzer.cc with ASan takes too long, see
# http://crbug.com/360158. # http://crbug.com/360158.
configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ] configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/compiler/compiler.gni") import("//build/config/compiler/compiler.gni")
if (is_android) { if (is_android) {
# Pull in enable_chrome_android_internal and public_android_sdk # Pull in enable_chrome_android_internal and public_android_sdk
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
} }
if (is_chromeos) { if (is_chromeos_ash) {
import("//build/config/chromeos/rules.gni") import("//build/config/chromeos/rules.gni")
} }
...@@ -49,7 +50,7 @@ group("telemetry_chrome_test") { ...@@ -49,7 +50,7 @@ group("telemetry_chrome_test") {
# CrOS currently has issues with the locally compiled version of # CrOS currently has issues with the locally compiled version of
# crashpad_database_util, so only include it on traditional Linux # crashpad_database_util, so only include it on traditional Linux
# platforms. # platforms.
if (is_linux) { if (is_linux || is_chromeos_lacros) {
data_deps += data_deps +=
[ "//third_party/crashpad/crashpad/tools:crashpad_database_util" ] [ "//third_party/crashpad/crashpad/tools:crashpad_database_util" ]
} }
...@@ -64,7 +65,7 @@ group("telemetry_chrome_test") { ...@@ -64,7 +65,7 @@ group("telemetry_chrome_test") {
] ]
} }
if (is_chromeos && is_chromeos_device) { if (is_chromeos_ash && is_chromeos_device) {
data_deps += [ data_deps += [
"//:chromiumos_preflight", "//:chromiumos_preflight",
"//chromeos:cros_chrome_deploy", "//chromeos:cros_chrome_deploy",
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
# to speedup creating a V8 context and setting up around it. # to speedup creating a V8 context and setting up around it.
import("//build/config/chromecast_build.gni") import("//build/config/chromecast_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/v8_target_cpu.gni") import("//build/config/v8_target_cpu.gni")
import("//v8/gni/v8.gni") import("//v8/gni/v8.gni")
...@@ -15,7 +16,7 @@ declare_args() { ...@@ -15,7 +16,7 @@ declare_args() {
# TODO(crbug.com/764576): Enable the feature on more environments. # TODO(crbug.com/764576): Enable the feature on more environments.
# Disable in mac and win cross builds since building Blink twice is slow. # Disable in mac and win cross builds since building Blink twice is slow.
use_v8_context_snapshot = use_v8_context_snapshot =
!is_chromeos && !is_android && !is_chromecast && !is_fuchsia && !is_chromeos_ash && !is_android && !is_chromecast && !is_fuchsia &&
!(host_os == "mac" && current_cpu == "x86") && !(host_os == "mac" && current_cpu == "x86") &&
(v8_target_cpu == target_cpu || is_msan) && (v8_target_cpu == target_cpu || is_msan) &&
!(is_win && host_os != "win") && !(is_mac && host_os != "mac") !(is_win && host_os != "win") && !(is_mac && host_os != "mac")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment