PSM: Support PSM libs on ChromeOS platform only

In that way, PSM libs are being supported on ChromeOS only. However,
due to the current device_management_backend structure, PSM protos
can be used by multiple platforms too.

Bug: chromium:1124157
Change-Id: I0e9e6f2f2c55a5088ef1484262ada3f984ff5b88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2389202
Reviewed-by: Yves Arrouye <drcrash@chromium.org>
Reviewed-by: Amr Aboelkher <amraboelkher@google.com>
Reviewed-by: Amr Aboelkher <amraboelkher@chromium.org>
Commit-Queue: Amr Aboelkher <amraboelkher@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803784}
GitOrigin-RevId: a8891f7ad6885a55e31438daf6ed02fed722168f
diff --git a/BUILD.gn b/BUILD.gn
index 3570685..60acbf5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -46,52 +46,54 @@
 }
 
 # SHELL lib.
-source_set("shell_encryption") {
-  public_configs = [ ":shell_encryption_config1" ]
-  configs -= [ "//build/config/compiler:chromium_code" ]
-  configs += [ "//build/config/compiler:no_chromium_code" ]
-  public = [
-    "glog/logging.h",
-    "src/bits_util.h",
-    "src/constants.h",
-    "src/context.h",
-    "src/error_params.h",
-    "src/galois_key.h",
-    "src/int256.h",
-    "src/integral_types.h",
-    "src/montgomery.h",
-    "src/ntt_parameters.h",
-    "src/polynomial.h",
-    "src/prng/chacha_prng.h",
-    "src/prng/chacha_prng_util.h",
-    "src/prng/integral_prng_types.h",
-    "src/prng/prng.h",
-    "src/prng/single_thread_chacha_prng.h",
-    "src/relinearization_key.h",
-    "src/sample_error.h",
-    "src/status_macros.h",
-    "src/statusor.h",
-    "src/symmetric_encryption.h",
-    "src/symmetric_encryption_with_prng.h",
-    "src/transcription.h",
-  ]
-  sources = [
-    "src/int256.cc",
-    "src/montgomery.cc",
-    "src/ntt_parameters.cc",
-    "src/prng/chacha_prng.cc",
-    "src/prng/chacha_prng_util.cc",
-    "src/prng/single_thread_chacha_prng.cc",
-    "src/relinearization_key.cc",
-    "src/statusor.cc",
-  ]
-  public_deps = [
-    ":serialization_proto",
-    "//base:base",
-    "//third_party/abseil-cpp:absl",
-    "//third_party/boringssl:boringssl",
-    "//third_party/protobuf:protobuf_lite",
-  ]
+if (is_chromeos) {
+  source_set("shell_encryption") {
+    public_configs = [ ":shell_encryption_config1" ]
+    configs -= [ "//build/config/compiler:chromium_code" ]
+    configs += [ "//build/config/compiler:no_chromium_code" ]
+    public = [
+      "glog/logging.h",
+      "src/bits_util.h",
+      "src/constants.h",
+      "src/context.h",
+      "src/error_params.h",
+      "src/galois_key.h",
+      "src/int256.h",
+      "src/integral_types.h",
+      "src/montgomery.h",
+      "src/ntt_parameters.h",
+      "src/polynomial.h",
+      "src/prng/chacha_prng.h",
+      "src/prng/chacha_prng_util.h",
+      "src/prng/integral_prng_types.h",
+      "src/prng/prng.h",
+      "src/prng/single_thread_chacha_prng.h",
+      "src/relinearization_key.h",
+      "src/sample_error.h",
+      "src/status_macros.h",
+      "src/statusor.h",
+      "src/symmetric_encryption.h",
+      "src/symmetric_encryption_with_prng.h",
+      "src/transcription.h",
+    ]
+    sources = [
+      "src/int256.cc",
+      "src/montgomery.cc",
+      "src/ntt_parameters.cc",
+      "src/prng/chacha_prng.cc",
+      "src/prng/chacha_prng_util.cc",
+      "src/prng/single_thread_chacha_prng.cc",
+      "src/relinearization_key.cc",
+      "src/statusor.cc",
+    ]
+    public_deps = [
+      ":serialization_proto",
+      "//base:base",
+      "//third_party/abseil-cpp:absl",
+      "//third_party/boringssl:boringssl",
+      "//third_party/protobuf:protobuf_lite",
+    ]
+  }
 }
 
 if (is_chromeos) {