0

Updates lacros.md slightly.

- Now OS_CHROMEOS macros are being replaced by BUILDFLAG(IS_CHROMEOS).
- Text decoration update.
- Removed unneeded trailing white spaces.

BUG=None
TEST=None

Change-Id: Iafda8a4b4b57aace6fa89fd064fe5925a11b9d42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3478998
Auto-Submit: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Andrew Moylan <amoylan@chromium.org>
Commit-Queue: Andrew Moylan <amoylan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#973619}
This commit is contained in:
Hidehiko Abe
2022-02-22 03:55:10 +00:00
committed by Chromium LUCI CQ
parent 161398713a
commit 51292b5e41

@@ -51,7 +51,7 @@ The ash-side implementation lives in
[//chrome/browser/ash/crosapi](https://chromium.googlesource.com/chromium/src.git/+/main/chrome/browser/ash/crosapi).
Code can be conditionally compiled into lacros via
BUILDFLAG(IS_CHROMEOS_LACROS).
`BUILDFLAG(IS_CHROMEOS_LACROS)`.
## Filing bugs
@@ -74,18 +74,18 @@ Once Lacros launches, the plan to use Lacros vs Chrome will be finalized.
## GN var and C++ macros
Both lacros and ash are built with gn arg `target_os="chromeos"`. This means
that C++ macro defined(OS_CHROMEOS) and gn variable is_chromeos are set true for
both lacros and ash.
that C++ macro `BUILDFLAG(IS_CHROMEOS)` (and `defined(OS_CHROMEOS)` for old code)
and gn variable is_chromeos are set true for both lacros and ash.
### Targeting ash or lacros
To target lacros or ash separately, use BUILDFLAG(IS_CHROMEOS_LACROS),
BUILDFLAG(IS_CHROMEOS_ASH) in C++ files and is_chromeos_lacros and
To target lacros or ash separately, use `BUILDFLAG(IS_CHROMEOS_LACROS)`,
`BUILDFLAG(IS_CHROMEOS_ASH)` in C++ files and is_chromeos_lacros and
is_chromeos_ash in gn files.
Note that these are not defined globally and must be included manually.
To use the buildflags in C++ files, add #include "build/chromeos_buildflags.h"
and then also add "//build:chromeos_buildflags" to deps of the target that is
To use the buildflags in C++ files, add `#include "build/chromeos_buildflags.h"`
and then also add `"//build:chromeos_buildflags"` to deps of the target that is
using the update C++ files inside gn files. See e.g. crrev.com/c/2494186.
To use the gn variables add `import("//build/config/chromeos/ui_mode.gni")`.
@@ -118,5 +118,5 @@ If you're sshing to your desktop, please prefix the command with
For sheriffs: Test failures that should have been caught by the CQ should be
treated like test failures on any other platform: investigated and fixed or
disabled. Use BUILDFLAG(IS_LACROS) to disable a test just for lacros. See the
disabled. Use `BUILDFLAG(IS_CHROMEOS_LACROS)` to disable a test just for lacros. See the
[sheriffing how-to](http://go/chrome-sheriffing-how-to#test-failed).