[go: nahoru, domu]

Assert is_chromeos_device and clean up

IIUC, build/config/chromeos/rules.gni is only supposed to be imported
when building for cros devices, so this CL does 2 things:
1. Assert is_chromeos_device to avoid being imported mistakenly or
   accidentally to avoid side effects and improve performance.
2. Fix places where build/config/chromeos/rules.gni shouldn't be
   imported and clean them up.

Change-Id: I9cae0635e358db30193171665a4c8138a3337c8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2832185
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874022}
diff --git a/testing/test.gni b/testing/test.gni
index aeb9f77..96502c7 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -30,7 +30,7 @@
   import("//build/config/fuchsia/generate_runner_scripts.gni")
   import("//build/config/fuchsia/package.gni")
   import("//third_party/fuchsia-sdk/sdk/build/cmc.gni")
-} else if (is_chromeos_ash || (is_chromeos_lacros && is_chromeos_device)) {
+} else if ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device) {
   import("//build/config/chromeos/rules.gni")
   import("//build/config/sanitizers/sanitizers.gni")
   import("//build/util/generate_wrapper.gni")